Chris Lattner
75b7692e66
switch off of 'Section' onto MCSection. We're not properly using
...
MCSection subclasses yet, but this is a step in the right direction.
llvm-svn: 77708
2009-07-31 18:48:30 +00:00
Dan Gohman
c4f0d838a9
Remove Annotation.h, which is no longer used in the LLVM tree.
...
llvm-svn: 77706
2009-07-31 18:36:25 +00:00
Evan Cheng
0c9705feed
Until we have a "ALIGN" pseudo instruction, have asm printer emitted a .align
...
to ensure the instruction that follows a TBB (when the number of table entries
is odd) is 2-byte aligned.
Patch by Sandeep Patel.
llvm-svn: 77705
2009-07-31 18:35:56 +00:00
Dan Gohman
dcc00a2e5c
MachineFunction no longer needs Annotation.
...
llvm-svn: 77704
2009-07-31 18:35:51 +00:00
Evan Cheng
038a564156
- Teach TBB / TBH offset limits are 510 and 131070 respectively since the offset
...
is scaled by two.
- Teach GetInstSizeInBytes about TBB and TBH.
llvm-svn: 77701
2009-07-31 18:28:05 +00:00
Dan Gohman
6bec53e39d
Fix printing of Alloca instructions with null operands.
...
llvm-svn: 77697
2009-07-31 18:23:24 +00:00
Dan Gohman
173cfdc02f
Fix some problems with ASTCallbackVH in its use as a DenseMap key.
...
llvm-svn: 77696
2009-07-31 18:21:48 +00:00
Devang Patel
34cec19943
Process DbgDeclareInst.
...
llvm-svn: 77694
2009-07-31 18:18:52 +00:00
Daniel Dunbar
23baa6b4ad
Normalize target registration code.
...
llvm-svn: 77692
2009-07-31 18:16:53 +00:00
Dan Gohman
f28b3bb262
Reapply r77654 with a fix: MachineFunctionPass's getAnalysisUsage
...
shouldn't do AU.setPreservesCFG(), because even though CodeGen passes
don't modify the LLVM IR CFG, they may modify the MachineFunction CFG,
and passes like MachineLoop are registered with isCFGOnly set to true.
llvm-svn: 77691
2009-07-31 18:16:33 +00:00
Chris Lattner
c156a00641
refactor section construction in TLOF to be through an explicit
...
initialize method, which can be called when an MCContext is available.
llvm-svn: 77687
2009-07-31 17:42:42 +00:00
Owen Anderson
d0e6352c97
Move getTrue() and getFalse() to 2.5-like APIs.
...
llvm-svn: 77685
2009-07-31 17:39:07 +00:00
Chris Lattner
a682cb61e7
split MCSection stuff out to its own .cpp file, add a new
...
MCSectionWithKind subclass of MCSection.
llvm-svn: 77684
2009-07-31 17:02:00 +00:00
Chris Lattner
610dfdece7
create sections with MCSection::Create instead of Context->getOrCreateSection.
...
This is needed to allow polymorphic sections.
llvm-svn: 77680
2009-07-31 16:43:49 +00:00
Chris Lattner
85a3632c7a
fix PR4650: we only track sizes for certain objects, so only put something
...
into the mergable section if it is one of our special cases. This could
obviously be improved, but this is the minimal fix and restores us to the
previous behavior.
llvm-svn: 77679
2009-07-31 16:17:13 +00:00
Benjamin Kramer
162dc26fb9
Work around a dangling pointer dereference when enumerating NamedMDNodes.
...
llvm-svn: 77675
2009-07-31 14:22:13 +00:00
Benjamin Kramer
83e2ae8eee
Fix a struct/class mismatch, to silence a MSVC warning.
...
llvm-svn: 77673
2009-07-31 11:35:26 +00:00
Sanjiv Gupta
059b94e803
define target names for std libcalls.
...
llvm-svn: 77667
2009-07-31 07:35:57 +00:00
Daniel Dunbar
60d71a790c
Revert r77654, it appears to be causing llvm-gcc bootstrap failures, and many
...
failures when building assorted projects with clang.
--- Reverse-merging r77654 into '.':
U include/llvm/CodeGen/Passes.h
U include/llvm/CodeGen/MachineFunctionPass.h
U include/llvm/CodeGen/MachineFunction.h
U include/llvm/CodeGen/LazyLiveness.h
U include/llvm/CodeGen/SelectionDAGISel.h
D include/llvm/CodeGen/MachineFunctionAnalysis.h
U include/llvm/Function.h
U lib/Target/CellSPU/SPUISelDAGToDAG.cpp
U lib/Target/PowerPC/PPCISelDAGToDAG.cpp
U lib/CodeGen/LLVMTargetMachine.cpp
U lib/CodeGen/MachineVerifier.cpp
U lib/CodeGen/MachineFunction.cpp
U lib/CodeGen/PrologEpilogInserter.cpp
U lib/CodeGen/MachineLoopInfo.cpp
U lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
D lib/CodeGen/MachineFunctionAnalysis.cpp
D lib/CodeGen/MachineFunctionPass.cpp
U lib/CodeGen/LiveVariables.cpp
llvm-svn: 77661
2009-07-31 03:02:41 +00:00
Daniel Dunbar
41639473ed
llvm-mc: Match a few X86 instructions.
...
- This is "experimental" code, I am feeling my way around and working out the
best way to do things (and learning tblgen in the process). Comments welcome,
but keep in mind this stuff will change radically.
- This is enough to match "subb" and friends, but not much else. The next step is to
automatically generate the matchers for individual operands.
llvm-svn: 77657
2009-07-31 02:32:59 +00:00
Dan Gohman
645f1122c0
Manage MachineFunctions with an analysis Pass instead of the Annotable
...
mechanism. To support this, make MachineFunctionPass a little more
complete.
llvm-svn: 77654
2009-07-31 01:52:50 +00:00
Benjamin Kramer
67e2ff4df1
Fix cmake build.
...
llvm-svn: 77649
2009-07-31 00:35:23 +00:00
Devang Patel
343bc16228
Add getOrInsertNamedMetadata().
...
llvm-svn: 77646
2009-07-30 23:59:04 +00:00
Evan Cheng
c9f31ae969
When fp is not eliminated, instructions with T2_i12 modes will be changed to T2_i8 ones. Take that into consideration when determining stack size limit for reserving register scavenging slot.
...
llvm-svn: 77642
2009-07-30 23:29:25 +00:00
Lang Hames
bf6e087067
Removed the BigBlock register allocator.
...
llvm-svn: 77640
2009-07-30 23:18:43 +00:00
Devang Patel
c3f4aa73cc
Do not use abbrev while writing NamedMDNode name.
...
llvm-svn: 77637
2009-07-30 23:06:35 +00:00
Devang Patel
da86d84743
Enumerate NamedMDNode elements first.
...
llvm-svn: 77636
2009-07-30 23:03:43 +00:00
Owen Anderson
93ccaf5c60
Move more code back to 2.5 APIs.
...
llvm-svn: 77635
2009-07-30 23:03:37 +00:00
David Goodwin
ef70179502
Remove redundant match for frame index from imm8 addrmode, it is handled by the imm12 addrmode.
...
llvm-svn: 77632
2009-07-30 22:45:52 +00:00
David Goodwin
62efc71b9f
Darwin assembler now recognizes "orn", so remove workaround.
...
llvm-svn: 77627
2009-07-30 21:51:41 +00:00
David Goodwin
d29f81da16
Darwin assembler now supports "rrx", so remove workaround.
...
llvm-svn: 77625
2009-07-30 21:38:40 +00:00
Daniel Dunbar
298e11de31
Twine: Directly support int, long, and long long types.
...
- This should resolve Cygwin gcc ambiguities.
llvm-svn: 77624
2009-07-30 21:15:14 +00:00
Dan Gohman
30dfed41b8
Use CallbackVH in AliasSetTracker to avoid getting stuck with
...
dangling Value*s.
llvm-svn: 77623
2009-07-30 20:21:41 +00:00
David Goodwin
2eaffa79af
Cleanup and include code selection for some frame index cases.
...
llvm-svn: 77622
2009-07-30 18:56:48 +00:00
Devang Patel
9b0dea089b
Start using DebugInfoFinder.
...
llvm-svn: 77621
2009-07-30 18:56:46 +00:00
Devang Patel
788d39ffd4
Do not use getNamedValue() to lookup NamedMDNode. NamedMDNode is not a GlobalValue.
...
Thanks Benjamin Kramer!
llvm-svn: 77619
2009-07-30 18:46:29 +00:00
Daniel Dunbar
edd0313a36
Twine: Use raw_ostream::write_hex, remove unused itohexstr method.
...
llvm-svn: 77617
2009-07-30 18:30:19 +00:00
Devang Patel
ab56b759af
s/DebugInfoEnumerator/DebugInfoFinder/g
...
llvm-svn: 77615
2009-07-30 18:25:15 +00:00
Daniel Dunbar
79e9ed1d26
Add raw_ostream::write_hex
...
llvm-svn: 77614
2009-07-30 18:21:23 +00:00
David Goodwin
30429aef93
Add missing D* register clobbers for Thumb-2 call.
...
llvm-svn: 77611
2009-07-30 18:01:09 +00:00
Daniel Dunbar
81f704c26a
Twines: Don't allow implicit conversion from integers, this is too tricky.
...
llvm-svn: 77605
2009-07-30 17:37:43 +00:00
Devang Patel
751490b934
walk DbgRegionStartInst and DbgRegionEndInst
...
llvm-svn: 77604
2009-07-30 17:30:23 +00:00
Dan Gohman
0caa78bc21
Minor whitespace tidiness.
...
llvm-svn: 77602
2009-07-30 17:04:07 +00:00
Dan Gohman
0a16a3ee84
Rename GRAD to GR32_AD, to follow the naming convention of other
...
classes. And define its SubRegClassList.
llvm-svn: 77601
2009-07-30 17:02:08 +00:00
Chris Lattner
edb8650e80
add a random codegen deficiency.
...
llvm-svn: 77598
2009-07-30 16:08:58 +00:00
Benjamin Kramer
85fa67c3c5
fix a unitialized pointer in NamedMDNode (and reenable unittest)
...
llvm-svn: 77597
2009-07-30 15:35:55 +00:00
Sanjiv Gupta
b2aad805e0
Allow targets to define libcall names for mem(cpy,set,move) intrinsics, rather than hardcoding them in DAG lowering.
...
llvm-svn: 77586
2009-07-30 09:12:56 +00:00
Evan Cheng
20a1862b23
Add a note.
...
llvm-svn: 77584
2009-07-30 08:56:19 +00:00
Evan Cheng
148032a1a2
Optimize some common usage patterns of atomic built-ins __sync_add_and_fetch() and __sync_sub_and_fetch.
...
When the return value is not used (i.e. only care about the value in the memory), x86 does not have to use add to implement these. Instead, it can use add, sub, inc, dec instructions with the "lock" prefix.
This is currently implemented using a bit of instruction selection trick. The issue is the target independent pattern produces one output and a chain and we want to map it into one that just output a chain. The current trick is to select it into a merge_values with the first definition being an implicit_def. The proper solution is to add new ISD opcodes for the no-output variant. DAG combiner can then transform the node before it gets to target node selection.
Problem #2 is we are adding a whole bunch of x86 atomic instructions when in fact these instructions are identical to the non-lock versions. We need a way to add target specific information to target nodes and have this information carried over to machine instructions. Asm printer (or JIT) can use this information to add the "lock" prefix.
llvm-svn: 77582
2009-07-30 08:33:02 +00:00
Daniel Dunbar
4d07efb3c4
Switch obvious clients to Twine instead of utostr (when they were already using
...
a Twine, e.g., for names).
- I am a little ambivalent about this; we don't want the string conversion of
utostr, but using overload '+' mixed with string and integer arguments is
sketchy. On the other hand, this particular usage is something of an idiom.
llvm-svn: 77579
2009-07-30 04:20:37 +00:00
Sanjiv Gupta
6692c2401b
Keep track of references to mem(cpy,move,set) and then print only one extern
...
declaration for them.
llvm-svn: 77578
2009-07-30 04:15:15 +00:00
Daniel Dunbar
4d8b1776b4
Twine: Provide [u]int{32,64} conversions via implicit constructors instead of
...
explicitly.
llvm-svn: 77576
2009-07-30 03:47:15 +00:00
Andreas Bolka
56d7bc03dd
Equal SCEVs of a subscript give rise to dependence.
...
llvm-svn: 77570
2009-07-30 02:26:01 +00:00
Nate Begeman
72315231bc
Typo
...
llvm-svn: 77568
2009-07-30 02:00:06 +00:00
Dan Gohman
3c7e8160f6
Add a new register class to describe operands that can't be SP,
...
due to x86 encoding restrictions. This is currently off by default
because it may cause code quality regressions. This is for PR4572.
llvm-svn: 77565
2009-07-30 01:56:29 +00:00
Devang Patel
efd06c46c7
Check null NameMDNode elements.
...
llvm-svn: 77559
2009-07-30 01:02:04 +00:00
Dan Gohman
179f1e8a27
Eliminate a bunch of redundant tables.
...
llvm-svn: 77558
2009-07-30 00:40:42 +00:00
Bob Wilson
8624e45518
Lower a 128-bit BUILD_VECTOR with 2 elements to a pair of INSERT_VECTOR_ELTs.
...
llvm-svn: 77557
2009-07-30 00:31:25 +00:00
Dan Gohman
79565c910c
Use array_endof instead of doing it manually.
...
llvm-svn: 77553
2009-07-30 00:10:18 +00:00
Devang Patel
ee25ed96f5
print single NamedMDNode.
...
llvm-svn: 77549
2009-07-30 00:02:57 +00:00
Evan Cheng
31ac181755
tbb / tbh instructions only branch forward, not backwards.
...
llvm-svn: 77522
2009-07-29 23:20:20 +00:00
Evan Cheng
fabbd6219a
Add VFP3 D registers to the DPR register class.
...
llvm-svn: 77521
2009-07-29 23:03:41 +00:00
Nicolas Geoffray
1583f76c9a
In TrimAllocationToSize, if a block is below the minimum allocation size,
...
there is no new block added to the free list. Therefore on the next
startFunctionBody call, a new slab must be allocated.
llvm-svn: 77520
2009-07-29 22:55:02 +00:00
Douglas Gregor
8c9b60cabc
Eliminate a few unused-variable warnings
...
llvm-svn: 77519
2009-07-29 22:41:10 +00:00
Devang Patel
d5b7c64109
Read and write NamedMDNode.
...
llvm-svn: 77517
2009-07-29 22:34:41 +00:00
Owen Anderson
881d928f9b
Move types back to the 2.5 API.
...
llvm-svn: 77516
2009-07-29 22:17:13 +00:00
Devang Patel
d788af24ac
Print named metadata.
...
llvm-svn: 77513
2009-07-29 22:04:47 +00:00
Daniel Dunbar
89cb72a6bc
Fix PR4645 which was fallout from the fix for PR4641.
...
- Call RAUW to delete all instructions (this is a patch from Nick Lewycky).
llvm-svn: 77512
2009-07-29 22:00:43 +00:00
Devang Patel
c8dfc60e5e
There is no need to keep name ref in NamedMDNode.
...
llvm-svn: 77511
2009-07-29 21:58:56 +00:00
Chris Lattner
613f031b68
inline the global 'getInstrOperandRegClass' function into its callers
...
now that TargetOperandInfo does the heavy lifting.
llvm-svn: 77508
2009-07-29 21:36:49 +00:00
Evan Cheng
90a1ca6e17
Make sure Thumb2 uses the right call instructions.
...
llvm-svn: 77507
2009-07-29 21:26:42 +00:00
Bill Wendling
67495ad58d
Forgot to output the base offset.
...
llvm-svn: 77505
2009-07-29 21:19:44 +00:00
Chris Lattner
6c284cc8cd
1. Introduce a new TargetOperandInfo::getRegClass() helper method
...
and convert code to using it, instead of having lots of things
poke the isLookupPtrRegClass() method directly.
2. Make PointerLikeRegClass contain a 'kind' int, and store it in
the existing regclass field of TargetOperandInfo when the
isLookupPtrRegClass() predicate is set. Make getRegClass pass
this into TargetRegisterInfo::getPointerRegClass(), allowing
targets to have multiple ptr_rc things.
llvm-svn: 77504
2009-07-29 21:10:12 +00:00
Chris Lattner
18af1b233a
Give getPointerRegClass() a "kind" value so that targets can
...
support multiple different pointer register classes.
llvm-svn: 77501
2009-07-29 20:31:52 +00:00
Evan Cheng
c8d3891c87
- Fix an obvious copy and paste error.
...
- Darwin Thumb2 call clobbers r9.
llvm-svn: 77500
2009-07-29 20:10:36 +00:00
Benjamin Kramer
da986c3fc9
Remove now unused Context variables.
...
llvm-svn: 77495
2009-07-29 19:14:17 +00:00
Owen Anderson
0ce2151b36
Move ConstantExpr to 2.5 API.
...
llvm-svn: 77494
2009-07-29 18:55:55 +00:00
Devang Patel
57fbaa252c
Refactor. Fix indentation.
...
llvm-svn: 77482
2009-07-29 18:15:02 +00:00
Eric Christopher
c9c896290e
Add llvm_unreachable for ... unreachable code!
...
llvm-svn: 77480
2009-07-29 18:14:04 +00:00
Daniel Dunbar
d2bf575100
Perform simplification noticed by Reid.
...
llvm-svn: 77477
2009-07-29 17:29:36 +00:00
Devang Patel
6bc0c66630
Keep track of named mdnodes in a Module using an ilist.
...
llvm-svn: 77476
2009-07-29 17:16:17 +00:00
Bob Wilson
355e0b70e0
Change Neon VLDn intrinsics to return multiple values instead of really
...
wide vectors. Likewise, change VSTn intrinsics to take separate arguments
for each vector in a multi-vector struct. Adjust tests accordingly.
llvm-svn: 77468
2009-07-29 16:39:22 +00:00
Bob Wilson
2f023d87ee
Fix an assumption that there is a single return value when verifying
...
overloaded types for intrinsic parameters.
llvm-svn: 77466
2009-07-29 16:25:56 +00:00
David Greene
04545750d9
Re-apply previous changes and improve column padding performance some more.
...
llvm-svn: 77461
2009-07-29 16:08:27 +00:00
Dan Gohman
a3af79a5c3
Minor code simplification.
...
llvm-svn: 77459
2009-07-29 15:58:36 +00:00
Daniel Dunbar
d13fcdaae5
Twines: Support numeric conversion directly (uitostr, etc).
...
- Provides static constructors for doing number to string conversions without
using temporaries.
- There are several ways to do this, I think given the Twine constraints this
is the simplest one.
- One FIXME for fast number -> hex conversion.
- Added another comment on one last major bit of perf work Twines need, which
is to make raw_svector_ostream more efficient.
llvm-svn: 77445
2009-07-29 07:08:44 +00:00
Daniel Dunbar
1589195975
raw_ostream: Follow the 32-bit path when printing "small" decimal numbers.
...
llvm-svn: 77444
2009-07-29 06:45:14 +00:00
Chris Lattner
c9d366b0c9
more syntactic cleanups.
...
llvm-svn: 77442
2009-07-29 06:33:53 +00:00
Chris Lattner
b53809dfe8
minor smallvector cleanups
...
llvm-svn: 77441
2009-07-29 06:29:53 +00:00
Chris Lattner
a54286efc5
whitespace cleanup.
...
llvm-svn: 77438
2009-07-29 05:48:09 +00:00
Andreas Bolka
eb2d2f79b8
Skeleton for pairwise subscript testing.
...
llvm-svn: 77437
2009-07-29 05:35:53 +00:00
Chris Lattner
12483f0bd7
mingw uses .data and .text, not _data and _text.
...
llvm-svn: 77435
2009-07-29 05:25:42 +00:00
Chris Lattner
f8a9c2f843
fix PR4584 with a trivial patch now that the pieces are in place.
...
llvm-svn: 77434
2009-07-29 05:20:33 +00:00
Nick Lewycky
e0524c1795
Bulk erasing instructions without RAUWing them is unsafe. Instead, break them
...
into a new BB that has no predecessors.
llvm-svn: 77433
2009-07-29 05:17:50 +00:00
Chris Lattner
5c3e1e0d0c
pass the mangler down into the various SectionForGlobal methods.
...
No functionality change.
llvm-svn: 77432
2009-07-29 05:09:30 +00:00
Chris Lattner
4f3ed9a1d0
constant prop a utostr.
...
llvm-svn: 77430
2009-07-29 04:55:08 +00:00
Chris Lattner
84205d6042
remove some completely wrong code. 1 is never < 16. It turns out that GCC appears to put strings of any length into the ELF cstring equivalent, so just rip out the code.
...
llvm-svn: 77429
2009-07-29 04:54:38 +00:00
Daniel Dunbar
02fa03ef37
Revert r77397, it causes significant regressions in llc performance.
...
llvm-svn: 77425
2009-07-29 03:04:22 +00:00
Evan Cheng
fc846dd401
Optimize Thumb2 jumptable to use tbb / tbh when all the offsets fit in byte / halfword.
...
llvm-svn: 77422
2009-07-29 02:18:14 +00:00
Eric Christopher
b64d6c8efc
Fix comment.
...
llvm-svn: 77415
2009-07-29 01:01:19 +00:00