Commit Graph

32647 Commits

Author SHA1 Message Date
Devang Patel
f84548db63 Gracefully handle various scopes while recording source line info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83317 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-05 18:03:19 +00:00
Dan Gohman
c6f69e94fa Remove an unnnecessary LLVMContext argument in
ConstantFoldLoadThroughGEPConstantExpr.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83311 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-05 16:36:26 +00:00
Dan Gohman
e41a115e6a Use Use::operator= instead of Use::set, for consistency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83310 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-05 16:31:55 +00:00
Dan Gohman
01a76ce8d9 Remove explicit enum integer values. They don't appear to be needed, and
they make it less convenient to add new entries.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83308 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-05 15:52:08 +00:00
Dan Gohman
21313bc62f Add RIP to GR64_NOREX. This fixed a MachineVerifier error when RIP
is used in an operand which requires GR64_NOREX.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83307 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-05 15:42:08 +00:00
Chris Lattner
cf0fe8d813 strength reduce a ton of type equality tests to check the typeid (Through
the new predicates I added) instead of going through a context and doing a
pointer comparison.  Besides being cheaper, this allows a smart compiler
to turn the if sequence into a switch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83297 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-05 05:54:46 +00:00
Chris Lattner
e65cd40ab9 teach the optimizer how to constant fold uadd/usub intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83295 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-05 05:26:04 +00:00
Chris Lattner
d0806a1519 simplify this code a bunch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83294 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-05 05:06:24 +00:00
Chris Lattner
68a0603dc5 code simplifications.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83292 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-05 05:00:35 +00:00
Chris Lattner
bbc33853a5 instcombine shouldn't delete all null checks for mallocs.
This fixes PR5130.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83290 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-05 02:47:47 +00:00
Chris Lattner
92bef66c10 stop MachineFunctionPass from claiming that it preserves LoopDependence info,
which causes dependence info to be linked into lli.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83289 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-05 02:35:05 +00:00
Chris Lattner
dbf75e813e remove llvm-db: it is completely broken and if anyone wants to do a debugger,
they should not base it on llvm-db (which not following almost any "best practices").


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83288 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-05 02:29:51 +00:00
Owen Anderson
08993acada Do away with the strange use of BitVectors in SSI, and just use normal sets. This makes the code much more C++/LLVM-ish.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83286 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-04 18:49:55 +00:00
Jakob Stoklund Olesen
b44fad7f95 Whitespace and formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83285 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-04 18:18:39 +00:00
Owen Anderson
216abab84f Fix a typo in the comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83283 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-04 17:52:13 +00:00
Owen Anderson
7aa3c781b4 SSI needs to require DT and DF transitively, since it uses them outside of its runOnFunction.
Similarly, it can be marked setPreservesAll, since it does no work in its runOnFunction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83282 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-04 17:47:39 +00:00
Evan Cheng
a0479e5332 Allow -inline-threshold override default threshold even if compiling to optimize for size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83274 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-04 06:13:54 +00:00
Nick Lewycky
b13105fbf6 Requires element types in a constant initializer to match the element types of
of the constant. This reverts r6544 and r7428.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83270 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-03 19:30:43 +00:00
Bob Wilson
916ac5b069 Add a comment to describe letters used in multiclass name suffixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83257 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-03 04:44:16 +00:00
Bob Wilson
8f07b9e8a9 Fix encoding problem for VMLS instruction.
Thanks to Johnny Chen for pointing this out!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83256 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-03 04:41:21 +00:00
Lang Hames
6cc91e39c0 Oops. Renamed remaining MachineInstrIndex references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83255 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-03 04:31:31 +00:00
Lang Hames
cc3b0650f1 Renamed MachineInstrIndex to LiveIndex.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83254 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-03 04:21:37 +00:00
Benjamin Kramer
7d26948662 MingW build fixes
- MingW needs -lpsapi (in ${LIBS}) linked after -lLLVMSystem.
  Noticed by Ronald Pijnacker!

- Some parts of the System library must be build with exceptions on windows.
  Based on a patch by Jay Foad!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83251 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-02 19:36:31 +00:00
Benjamin Kramer
8bff4af612 Fix a use-after-free in post-ra-scheduling.
MI->addOperand invalidates references to it's operands, avoid touching
the operand after a new one was added.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83249 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-02 15:59:52 +00:00
Evan Cheng
048e36f536 getFunctionAlignment should return log2 alignment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83242 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-02 06:57:25 +00:00
Evan Cheng
892597943a Forgot about ARM::tPUSH. It also has a new writeback operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83237 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-02 05:03:07 +00:00
Evan Cheng
62a1b5db44 Move load / store multiple before post-alloc scheduling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83236 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-02 04:57:15 +00:00
David Goodwin
63bcbb72f7 All callee-saved registers are live-out of a return block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83223 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-01 23:28:47 +00:00
David Goodwin
9843a93e83 Remove neonfp attribute and instead set default based on CPU string. Add -arm-use-neon-fp to override the default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83218 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-01 22:19:57 +00:00
Mike Stump
e4250396ea Expand api out in the usual inserter way, though, I do have a
question, can we get rid of the BasicBlock versions of all inserters
and use Head == 0 to indicate the old case when GetInsertBlock == 0?


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83216 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-01 22:08:58 +00:00
David Goodwin
471850ab84 Restore the -post-RA-scheduler flag as an override for the target specification. Remove -mattr for setting PostRAScheduler enable and instead use CPU string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83215 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-01 21:46:35 +00:00
Evan Cheng
10469f8e48 ARM::tPOP and tPOP_RET each has an extra writeback operand now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83214 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-01 20:54:53 +00:00
Devang Patel
af9e84701b Add support to extract lexical scope information from DebugLoc attached with an machine instruction.
This is not yet enabled.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83210 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-01 20:31:14 +00:00
David Goodwin
c7951f8e09 Use MachineFrameInfo.getPristineRegs() to determine which callee-saved registers are available for anti-dependency breaking. Some cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83208 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-01 19:45:32 +00:00
Devang Patel
d38dd11e12 Record first and last instruction of a scope in DbgScope.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83207 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-01 18:25:23 +00:00
Evan Cheng
714e8bc1fc Observe hasExtraSrcRegAllocReq and hasExtraDefRegAllocReq. Do not change
operands of instructions with these properties while breaking anti-dep.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83198 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-01 08:26:23 +00:00
Evan Cheng
0d92f5f768 Add hasExtraSrcRegAllocReq and hasExtraDefRegAllocReq flags to ld / st multiple,
ld / st pairs, etc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83197 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-01 08:22:27 +00:00
Douglas Gregor
8f3ec31133 Remove GVNPRE.cpp from the CMake makefile
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83194 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-01 05:30:05 +00:00
Chris Lattner
99be299edb remove the GVNPRE pass. It has been subsumed by the GVN pass.
Ok'd by Owen.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83193 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-01 02:18:36 +00:00
Evan Cheng
7c043d7319 Update ARM JIT emitter to account for ld/st multiple changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83192 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-01 01:39:21 +00:00
Evan Cheng
d20d658675 Change ld/st multiples to explicitly model the writeback to base register. This fixes most of the -ldstopti-before-sched2 regressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83191 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-01 01:33:39 +00:00
Devang Patel
a1434045c3 Add another MDNode into DebugLocTuple. This will be used to keep track of inlined functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83190 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-01 01:15:28 +00:00
Devang Patel
75549f4444 If location info is attached with an instruction then keep track of alloca slots used by a variable. This info will be used by AsmPrinter to emit debug info for variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83189 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-01 01:03:26 +00:00
Devang Patel
b0fdedb3fd Use MachineInstr as an processDebugLoc() argument.
This will allow processDebugLoc() to handle scopes for DWARF debug info. 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83183 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-30 23:12:50 +00:00
Devang Patel
3d910835fc Use MDNode * directly as an RecordSourceLine() argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83182 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-30 22:51:28 +00:00
Devang Patel
a63710124a Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83181 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-30 22:43:52 +00:00
Devang Patel
ecbeb1a490 Add isFOO() helpers. Fix getDirectory() and getFilename() for DIScope.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83180 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-30 22:34:41 +00:00
Bob Wilson
29e066965f Use OutStreamer.SwitchSection instead of writing out textual section directives.
Add a new TargetLoweringObjectFileMachO::getConstTextCoalSection method to
get access to that section.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83178 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-30 22:25:37 +00:00
Bob Wilson
812209a58c Add a new virtual EmitStartOfAsmFile method to the AsmPrinter and use this
to emit target-specific things at the beginning of the asm output.  This
fixes a problem for PPC, where the text sections are not being kept together
as expected.  The base class doInitialization code calls DW->BeginModule()
which emits a bunch of DWARF section directives.  The PPC doInitialization
code then emits all the TEXT section directives, with the intention that they
will be kept together. But as I understand it, the Darwin assembler treats
the default TEXT section as a special case and moves it to the beginning of
the file, which means that all those DWARF sections are in the middle of
the text.  With this change, the EmitStartOfAsmFile hook is called before
the DWARF section directives are emitted, so that all the PPC text section
directives come out right at the beginning of the file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83176 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-30 22:06:26 +00:00
Bob Wilson
c4c39faa05 Fix a comment typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83174 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-30 21:44:42 +00:00