Commit Graph

30637 Commits

Author SHA1 Message Date
Chris Lattner
fcdbf4ecc3 create sections with MCSection::Create instead of Context->getOrCreateSection.
This is needed to allow polymorphic sections.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77680 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 16:43:49 +00:00
Chris Lattner
82987bfe9b 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77679 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 16:17:13 +00:00
Benjamin Kramer
624f3b930d Work around a dangling pointer dereference when enumerating NamedMDNodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77675 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 14:22:13 +00:00
Benjamin Kramer
c6b79ac88e Fix a struct/class mismatch, to silence a MSVC warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77673 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 11:35:26 +00:00
Sanjiv Gupta
aa93917a5e define target names for std libcalls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77667 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 07:35:57 +00:00
Daniel Dunbar
c5b19b21d8 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77661 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 03:02:41 +00:00
Daniel Dunbar
a027d222e1 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77657 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 02:32:59 +00:00
Dan Gohman
933c762371 Manage MachineFunctions with an analysis Pass instead of the Annotable
mechanism. To support this, make MachineFunctionPass a little more
complete.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77654 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 01:52:50 +00:00
Benjamin Kramer
376cd007ec Fix cmake build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77649 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 00:35:23 +00:00
Devang Patel
49fe6c914c Add getOrInsertNamedMetadata().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77646 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 23:59:04 +00:00
Evan Cheng
ee42fd309e 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77642 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 23:29:25 +00:00
Lang Hames
2f75c727f2 Removed the BigBlock register allocator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77640 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 23:18:43 +00:00
Devang Patel
b3f7c61d9c Do not use abbrev while writing NamedMDNode name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77637 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 23:06:35 +00:00
Devang Patel
53a7c6c983 Enumerate NamedMDNode elements first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77636 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 23:03:43 +00:00
Owen Anderson
9e9a0d5fc2 Move more code back to 2.5 APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77635 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 23:03:37 +00:00
David Goodwin
07337c0fcf Remove redundant match for frame index from imm8 addrmode, it is handled by the imm12 addrmode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77632 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 22:45:52 +00:00
David Goodwin
8f65253236 Darwin assembler now recognizes "orn", so remove workaround.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77627 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 21:51:41 +00:00
David Goodwin
7c92f3ac99 Darwin assembler now supports "rrx", so remove workaround.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77625 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 21:38:40 +00:00
Daniel Dunbar
2d8bc0fe70 Twine: Directly support int, long, and long long types.
- This should resolve Cygwin gcc ambiguities.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77624 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 21:15:14 +00:00
Dan Gohman
b5b56ba9d4 Use CallbackVH in AliasSetTracker to avoid getting stuck with
dangling Value*s.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77623 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 20:21:41 +00:00
David Goodwin
d8c95b5ac2 Cleanup and include code selection for some frame index cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77622 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 18:56:48 +00:00
Devang Patel
78ab9e2c49 Start using DebugInfoFinder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77621 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 18:56:46 +00:00
Devang Patel
76dd4e8941 Do not use getNamedValue() to lookup NamedMDNode. NamedMDNode is not a GlobalValue.
Thanks Benjamin Kramer!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77619 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 18:46:29 +00:00
Daniel Dunbar
0fffbafa96 Twine: Use raw_ostream::write_hex, remove unused itohexstr method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77617 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 18:30:19 +00:00
Devang Patel
98c65173bb s/DebugInfoEnumerator/DebugInfoFinder/g
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77615 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 18:25:15 +00:00
Daniel Dunbar
48018e08f0 Add raw_ostream::write_hex
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77614 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 18:21:23 +00:00
David Goodwin
3e4b22d983 Add missing D* register clobbers for Thumb-2 call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77611 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 18:01:09 +00:00
Daniel Dunbar
fe09b2098a Twines: Don't allow implicit conversion from integers, this is too tricky.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77605 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 17:37:43 +00:00
Devang Patel
e802f1c4c3 walk DbgRegionStartInst and DbgRegionEndInst
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77604 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 17:30:23 +00:00
Dan Gohman
524dab14f4 Minor whitespace tidiness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77602 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 17:04:07 +00:00
Dan Gohman
68a31c2583 Rename GRAD to GR32_AD, to follow the naming convention of other
classes. And define its SubRegClassList.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77601 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 17:02:08 +00:00
Chris Lattner
513503961d add a random codegen deficiency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77598 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 16:08:58 +00:00
Benjamin Kramer
20cc4b8cd9 fix a unitialized pointer in NamedMDNode (and reenable unittest)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77597 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 15:35:55 +00:00
Sanjiv Gupta
a114baa5bf Allow targets to define libcall names for mem(cpy,set,move) intrinsics, rather than hardcoding them in DAG lowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77586 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 09:12:56 +00:00
Evan Cheng
7216920791 Add a note.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77584 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 08:56:19 +00:00
Evan Cheng
37b7387da9 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77582 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 08:33:02 +00:00
Daniel Dunbar
7f93dc8345 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77579 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 04:20:37 +00:00
Sanjiv Gupta
e409f0a779 Keep track of references to mem(cpy,move,set) and then print only one extern
declaration for them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77578 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 04:15:15 +00:00
Daniel Dunbar
0165a2ca89 Twine: Provide [u]int{32,64} conversions via implicit constructors instead of
explicitly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77576 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 03:47:15 +00:00
Andreas Bolka
713395950a Equal SCEVs of a subscript give rise to dependence.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77570 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 02:26:01 +00:00
Nate Begeman
55a961f075 Typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77568 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 02:00:06 +00:00
Dan Gohman
a4714e025d 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77565 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 01:56:29 +00:00
Devang Patel
e8861b840b Check null NameMDNode elements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77559 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 01:02:04 +00:00
Dan Gohman
084d1ba5ad Eliminate a bunch of redundant tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77558 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 00:40:42 +00:00
Bob Wilson
cf661e2c56 Lower a 128-bit BUILD_VECTOR with 2 elements to a pair of INSERT_VECTOR_ELTs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77557 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 00:31:25 +00:00
Dan Gohman
7c5f0c5ce9 Use array_endof instead of doing it manually.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77553 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 00:10:18 +00:00
Devang Patel
c29d5b378e print single NamedMDNode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77549 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 00:02:57 +00:00
Evan Cheng
8770f747a9 tbb / tbh instructions only branch forward, not backwards.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77522 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29 23:20:20 +00:00
Evan Cheng
d600522608 Add VFP3 D registers to the DPR register class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77521 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29 23:03:41 +00:00
Nicolas Geoffray
1b10d798d7 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77520 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29 22:55:02 +00:00