oota-llvm.git
14 years agoDon't use DILocation when processing a DebugLoc.
Nicolas Geoffray [Wed, 14 Apr 2010 22:06:37 +0000 (22:06 +0000)]
Don't use DILocation when processing a DebugLoc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101294 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFor t2BFI disassembly, apply the same error checking as in r101205.
Johnny Chen [Wed, 14 Apr 2010 22:04:45 +0000 (22:04 +0000)]
For t2BFI disassembly, apply the same error checking as in r101205.
Change the error msg to read "Encoding error: msb < lsb".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101293 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMove a bunch of methods from CallSite to CallSiteBase, so that they can
Dan Gohman [Wed, 14 Apr 2010 21:47:32 +0000 (21:47 +0000)]
Move a bunch of methods from CallSite to CallSiteBase, so that they can
be used in ImmutableCallSite too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101292 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFixed another assert exposed by fuzzing. The utility function getRegisterEnum()
Johnny Chen [Wed, 14 Apr 2010 21:03:13 +0000 (21:03 +0000)]
Fixed another assert exposed by fuzzing.  The utility function getRegisterEnum()
was asserting because the (RegClass, RegNum) combination doesn't make sense from
an encoding point of view.

Since getRegisterEnum() is used all over the place, to change the code to check
for encoding error after each call would not only bloat the code, but also make
it less readable.  An Err flag is added to the ARMBasicMCBuilder where a client
can set a non-zero value to indicate some kind of error condition while building
up the MCInst.  ARMBasicMCBuilder::BuildIt() checks this flag and returns false
if a non-zero value is detected.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101290 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove unneeded types from test.
Jakob Stoklund Olesen [Wed, 14 Apr 2010 20:56:09 +0000 (20:56 +0000)]
Remove unneeded types from test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101286 91177308-0d34-0410-b5e6-96231b3b80d8

14 years ago- Code clean up to reduce indentation.
Evan Cheng [Wed, 14 Apr 2010 20:52:55 +0000 (20:52 +0000)]
- Code clean up to reduce indentation.
- TryToOptimizeStoreOfMallocToGlobal should check if TargetData is available and bail out if it is not. The transformations being done requires TD.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101285 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUse FunTy instead of hard-coding Function.
Dan Gohman [Wed, 14 Apr 2010 20:49:44 +0000 (20:49 +0000)]
Use FunTy instead of hard-coding Function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101283 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDon't custom lower bit converts to ARM VMOVDRRD or VMOVDRR when the operand
Bob Wilson [Wed, 14 Apr 2010 20:45:23 +0000 (20:45 +0000)]
Don't custom lower bit converts to ARM VMOVDRRD or VMOVDRR when the operand
does not have a legal type.  The legalizer does not know how to handle those
nodes.  Radar 7854640.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101282 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoOops, make these public.
Dan Gohman [Wed, 14 Apr 2010 20:31:28 +0000 (20:31 +0000)]
Oops, make these public.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101280 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMove getType() and getCaller() into CallSiteBase so that
Dan Gohman [Wed, 14 Apr 2010 20:28:44 +0000 (20:28 +0000)]
Move getType() and getCaller() into CallSiteBase so that
ImmutableCallSite can use them too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101279 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTrim tests and convert to FileCheck.
Evan Cheng [Wed, 14 Apr 2010 20:22:17 +0000 (20:22 +0000)]
Trim tests and convert to FileCheck.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101277 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDelete unneeeded arguments.
Dan Gohman [Wed, 14 Apr 2010 20:17:22 +0000 (20:17 +0000)]
Delete unneeeded arguments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101276 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDelete unused arguments.
Dan Gohman [Wed, 14 Apr 2010 20:05:00 +0000 (20:05 +0000)]
Delete unused arguments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101275 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFactor out EH landing pad code into a separate function, and constify
Dan Gohman [Wed, 14 Apr 2010 19:53:31 +0000 (19:53 +0000)]
Factor out EH landing pad code into a separate function, and constify
a bunch of stuff to support it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101273 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoReset the debug location even if the instruction was a terminator.
Dan Gohman [Wed, 14 Apr 2010 19:30:02 +0000 (19:30 +0000)]
Reset the debug location even if the instruction was a terminator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101272 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix a missing #include.
Dan Gohman [Wed, 14 Apr 2010 18:57:18 +0000 (18:57 +0000)]
Fix a missing #include.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101270 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRefine #includes.
Dan Gohman [Wed, 14 Apr 2010 18:49:17 +0000 (18:49 +0000)]
Refine #includes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101269 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSplit ISD::NodeType and a few related items out of SelectionDAGNodes.h
Dan Gohman [Wed, 14 Apr 2010 18:44:34 +0000 (18:44 +0000)]
Split ISD::NodeType and a few related items out of SelectionDAGNodes.h
into a separate header to allow clients to use them without pulling in
SelectionDAG-specific declarations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101268 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoPull utility routines with no SelectionDAG dependence out of
Dan Gohman [Wed, 14 Apr 2010 18:31:02 +0000 (18:31 +0000)]
Pull utility routines with no SelectionDAG dependence out of
SelectionDAGBuilder. FunctionLoweringInfo isn't an ideal place for
them to live, but it's better than SelectionDAGBuilder for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101267 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix typos in comments.
Dan Gohman [Wed, 14 Apr 2010 18:24:06 +0000 (18:24 +0000)]
Fix typos in comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101266 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoperformance: cache the dereferenced use_iterator
Gabor Greif [Wed, 14 Apr 2010 18:13:29 +0000 (18:13 +0000)]
performance: cache the dereferenced use_iterator

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101265 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDelete an obsolete comment.
Dan Gohman [Wed, 14 Apr 2010 17:40:25 +0000 (17:40 +0000)]
Delete an obsolete comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101264 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDelete an unused function.
Dan Gohman [Wed, 14 Apr 2010 17:22:02 +0000 (17:22 +0000)]
Delete an unused function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101263 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoClear the FunctionLoweringInfo object before doing other things that
Dan Gohman [Wed, 14 Apr 2010 17:13:16 +0000 (17:13 +0000)]
Clear the FunctionLoweringInfo object before doing other things that
don't need it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101262 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMove this assert out of SelectionDAGISel into FunctionLoweringInfo, and
Dan Gohman [Wed, 14 Apr 2010 17:11:23 +0000 (17:11 +0000)]
Move this assert out of SelectionDAGISel into FunctionLoweringInfo, and
drop the redundant #ifndef NDEBUG.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101261 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a comment.
Dan Gohman [Wed, 14 Apr 2010 17:09:37 +0000 (17:09 +0000)]
Add a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101260 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMove the code for initialing the entry block livein set out of
Dan Gohman [Wed, 14 Apr 2010 17:05:00 +0000 (17:05 +0000)]
Move the code for initialing the entry block livein set out of
SelectionDAGISel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101258 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoReorgnaize this code to be more tidy and readable.
Dan Gohman [Wed, 14 Apr 2010 17:02:07 +0000 (17:02 +0000)]
Reorgnaize this code to be more tidy and readable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101256 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTrim #includes.
Dan Gohman [Wed, 14 Apr 2010 16:54:39 +0000 (16:54 +0000)]
Trim #includes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101255 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMove the code for emitting livein copies out of SelectionDAGISel.
Dan Gohman [Wed, 14 Apr 2010 16:51:49 +0000 (16:51 +0000)]
Move the code for emitting livein copies out of SelectionDAGISel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101254 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoperformance: cache the dereferenced use_iterator
Gabor Greif [Wed, 14 Apr 2010 16:48:56 +0000 (16:48 +0000)]
performance: cache the dereferenced use_iterator

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101253 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSink landing-pad marking code out of
Dan Gohman [Wed, 14 Apr 2010 16:32:56 +0000 (16:32 +0000)]
Sink landing-pad marking code out of
SelectionDAGISel::runOnMachineFunction into FunctionLowering.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101252 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoIt's not necessary to recompute EB here.
Dan Gohman [Wed, 14 Apr 2010 16:30:40 +0000 (16:30 +0000)]
It's not necessary to recompute EB here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101251 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoperformance: cache the dereferenced use_iterator
Gabor Greif [Wed, 14 Apr 2010 16:13:56 +0000 (16:13 +0000)]
performance: cache the dereferenced use_iterator

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101250 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a comment.
Dan Gohman [Wed, 14 Apr 2010 16:08:56 +0000 (16:08 +0000)]
Add a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101248 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix whitespace, comments.
Dan Gohman [Wed, 14 Apr 2010 15:59:02 +0000 (15:59 +0000)]
Fix whitespace, comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101247 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd explicit keywords.
Dan Gohman [Wed, 14 Apr 2010 15:50:02 +0000 (15:50 +0000)]
Add explicit keywords.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101246 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUse C++, not C++-standard-library-internals-ese.
Dan Gohman [Wed, 14 Apr 2010 15:41:50 +0000 (15:41 +0000)]
Use C++, not C++-standard-library-internals-ese.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101245 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake SuccIterator's private parts private too.
Dan Gohman [Wed, 14 Apr 2010 15:38:15 +0000 (15:38 +0000)]
Make SuccIterator's private parts private too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101244 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake helper utility members private.
Dan Gohman [Wed, 14 Apr 2010 15:33:04 +0000 (15:33 +0000)]
Make helper utility members private.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101243 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoEDis: Don't include inttypes.h. We support compilers which don't provide it. It was...
Benjamin Kramer [Wed, 14 Apr 2010 13:56:38 +0000 (13:56 +0000)]
EDis: Don't include inttypes.h. We support compilers which don't provide it. It was unused anyways.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101241 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoEnable RTTI again. While this works fine for LLVM, it creates an ABI
Nick Lewycky [Wed, 14 Apr 2010 05:51:59 +0000 (05:51 +0000)]
Enable RTTI again. While this works fine for LLVM, it creates an ABI
incompatibility with some clients covered by the buildbots, such as llvm-gcc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101237 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDon't forget cmake!
Nick Lewycky [Wed, 14 Apr 2010 05:35:20 +0000 (05:35 +0000)]
Don't forget cmake!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101234 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTurn off RTTI for VMCore. Yay!
Nick Lewycky [Wed, 14 Apr 2010 05:30:13 +0000 (05:30 +0000)]
Turn off RTTI for VMCore. Yay!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101233 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoI don't know how, but I managed to goof the revert. Remove function that should
Nick Lewycky [Wed, 14 Apr 2010 05:03:50 +0000 (05:03 +0000)]
I don't know how, but I managed to goof the revert. Remove function that should
have been removed in r101231.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101232 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevert r101213.
Nick Lewycky [Wed, 14 Apr 2010 04:51:58 +0000 (04:51 +0000)]
Revert r101213.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101231 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove accidentally committed cruft.
Nick Lewycky [Wed, 14 Apr 2010 04:46:11 +0000 (04:46 +0000)]
Remove accidentally committed cruft.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101230 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix 80 column ruler.
Nick Lewycky [Wed, 14 Apr 2010 04:40:35 +0000 (04:40 +0000)]
Fix 80 column ruler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101229 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoBugpoint no longer uses exceptions.
Nick Lewycky [Wed, 14 Apr 2010 04:40:31 +0000 (04:40 +0000)]
Bugpoint no longer uses exceptions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101228 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoimplement mc asmparser support for '.', which gets the
Chris Lattner [Wed, 14 Apr 2010 04:40:28 +0000 (04:40 +0000)]
implement mc asmparser support for '.', which gets the
current PC.  rdar://7834775

We now produce an identical .o file compared to the cctools
assembler for something like this:

_f0:
L0:
        jmp L1
        .long . - L0
L1:
        jmp A
        .long . - L1

        .zerofill __DATA,_bss,A,0

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101227 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove tab.
Nick Lewycky [Wed, 14 Apr 2010 04:19:05 +0000 (04:19 +0000)]
Remove tab.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101223 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCommit testcase for r101213.
Nick Lewycky [Wed, 14 Apr 2010 03:46:42 +0000 (03:46 +0000)]
Commit testcase for r101213.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101214 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWhile DAE can't modify the function signature of an externally visible function,
Nick Lewycky [Wed, 14 Apr 2010 03:38:11 +0000 (03:38 +0000)]
While DAE can't modify the function signature of an externally visible function,
it can check whether the visible direct callers are passing in parameters to
dead arguments and replace those with undef.

This reinstates r94322 with bugs fixed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101213 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoGeneralize this code to handle Instructions in addition to ConstantExprs.
Dan Gohman [Wed, 14 Apr 2010 02:33:23 +0000 (02:33 +0000)]
Generalize this code to handle Instructions in addition to ConstantExprs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101210 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoReorder the methods of this class to be a little more organized.
Dan Gohman [Wed, 14 Apr 2010 02:09:45 +0000 (02:09 +0000)]
Reorder the methods of this class to be a little more organized.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101206 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFixed another assert exposed by fuzzing. Now, when an encoding error occurs
Johnny Chen [Wed, 14 Apr 2010 02:05:29 +0000 (02:05 +0000)]
Fixed another assert exposed by fuzzing.  Now, when an encoding error occurs
involing getBFCInvMask() where lsb <= msb does not hold true, the disassembler
just returns false, instead of assert, to indicate disassembly error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101205 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoClear MachineInstr->MCSymbol maps at the end of a function.
Devang Patel [Wed, 14 Apr 2010 01:18:28 +0000 (01:18 +0000)]
Clear MachineInstr->MCSymbol maps at the end of a function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101202 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFixed an assert() exposed by fuzzing. Now, instead of assert when an invalid
Johnny Chen [Wed, 14 Apr 2010 01:17:37 +0000 (01:17 +0000)]
Fixed an assert() exposed by fuzzing.  Now, instead of assert when an invalid
instruction encoding is encountered, we just return a NULL ARMBasicMCBuilder
instance and the client just returns false to indicate disassembly error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101201 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix -Asserts warnings.
Daniel Dunbar [Tue, 13 Apr 2010 23:34:11 +0000 (23:34 +0000)]
Fix -Asserts warnings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101191 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoXFAIL this test for powerpc.
Devang Patel [Tue, 13 Apr 2010 23:23:09 +0000 (23:23 +0000)]
XFAIL this test for powerpc.
This test relies on iSel lowering dbg_declare intrinsic when CodeGen::OptLevel is None. On PPC side, CodeGen::OptLevel stays to default when -O0 is used on the command line.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101190 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUnbreak CMake build by improving the EnhancedDisassembly makefile a
Douglas Gregor [Tue, 13 Apr 2010 22:47:43 +0000 (22:47 +0000)]
Unbreak CMake build by improving the EnhancedDisassembly makefile a
bit (we're not trying to build a shared library yet) and generating
the X86GenEDInfo.inc and ARMGenEDInfo.inc files as necessary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101188 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFast path implicit_def check.
Evan Cheng [Tue, 13 Apr 2010 22:13:34 +0000 (22:13 +0000)]
Fast path implicit_def check.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101183 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd test for post-ra machine licm.
Evan Cheng [Tue, 13 Apr 2010 22:10:03 +0000 (22:10 +0000)]
Add test for post-ra machine licm.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101182 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoHandle a v2f64 formal parameter that is split between registers and memory
Bob Wilson [Tue, 13 Apr 2010 22:03:22 +0000 (22:03 +0000)]
Handle a v2f64 formal parameter that is split between registers and memory
such that the entire second half is in memory.  Radar 7855014.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101181 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoQuick fix for build errors caused by undefined
Sean Callanan [Tue, 13 Apr 2010 21:36:35 +0000 (21:36 +0000)]
Quick fix for build errors caused by undefined
NULL.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101180 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFixed a nasty layering violation in the edis source
Sean Callanan [Tue, 13 Apr 2010 21:21:57 +0000 (21:21 +0000)]
Fixed a nasty layering violation in the edis source
code.  It used to #include the enhanced disassembly
information for the targets it supported straight
out of lib/Target/{X86,ARM,...} but now it uses a
new interface provided by MCDisassembler, and (so
far) implemented by X86 and ARM.

Also removed hacky #define-controlled initialization
of targets in edis.  If clients only want edis to
initialize a limited set of targets, they can set
--enable-targets on the configure command line.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101179 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd CMake support for 'edis'.
Ted Kremenek [Tue, 13 Apr 2010 20:52:50 +0000 (20:52 +0000)]
Add CMake support for 'edis'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101177 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoChanged getSOImmValRotate()'s hunt retry logic to ignore the low order 6 bits,
Johnny Chen [Tue, 13 Apr 2010 20:35:16 +0000 (20:35 +0000)]
Changed getSOImmValRotate()'s hunt retry logic to ignore the low order 6 bits,
instead of 7, because we are only looking for even rotate amount.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101172 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDo not include types without any definition in pubtypes list.
Devang Patel [Tue, 13 Apr 2010 20:35:04 +0000 (20:35 +0000)]
Do not include types without any definition in pubtypes list.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101171 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAvoid variable shadowing.
Evan Cheng [Tue, 13 Apr 2010 20:25:29 +0000 (20:25 +0000)]
Avoid variable shadowing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101170 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoExpand postra machine licm's capability a little more. If an instruction's register...
Evan Cheng [Tue, 13 Apr 2010 20:21:05 +0000 (20:21 +0000)]
Expand postra machine licm's capability a little more. If an instruction's register operands are all loop invariants, then it's safe to hoist it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101167 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTeach MachineSinking to handle easy critical edges.
Jakob Stoklund Olesen [Tue, 13 Apr 2010 19:06:14 +0000 (19:06 +0000)]
Teach MachineSinking to handle easy critical edges.

Sometimes it is desirable to sink instructions along a critical edge:

x = ...
if (a && b) ...
else use(x);

The 'a && b' condition creates a critical edge to the else block, but we still
want to sink the computation of x into the block. The else block is dominated by
the parent block, so we are not pushing instructions into new code paths.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101165 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix test on non-x86 hosts.
Evan Cheng [Tue, 13 Apr 2010 18:54:04 +0000 (18:54 +0000)]
Fix test on non-x86 hosts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101163 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRe-apply 101075 and fix it properly. Just reuse the debug info of the branch instruct...
Evan Cheng [Tue, 13 Apr 2010 18:50:27 +0000 (18:50 +0000)]
Re-apply 101075 and fix it properly. Just reuse the debug info of the branch instruction being optimized. There is no need to --I which can deref off start of the BB.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101162 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake the disassembler respect the assembler dialect when printing instructions,
Chris Lattner [Tue, 13 Apr 2010 18:41:17 +0000 (18:41 +0000)]
Make the disassembler respect the assembler dialect when printing instructions,
patch by Marius Wachtler!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101160 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTemporarily revert r101075, it's causing invalid iterator assertions
Eric Christopher [Tue, 13 Apr 2010 18:37:58 +0000 (18:37 +0000)]
Temporarily revert r101075, it's causing invalid iterator assertions
in a nightly tester.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101158 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTeach postra machine licm to hoist more obvious invariants, e.g. instructions with...
Evan Cheng [Tue, 13 Apr 2010 18:16:00 +0000 (18:16 +0000)]
Teach postra machine licm to hoist more obvious invariants, e.g. instructions with no source operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101154 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a few comments.
Dan Gohman [Tue, 13 Apr 2010 17:07:06 +0000 (17:07 +0000)]
Add a few comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101148 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoEliminate MachineBasicBlock::const_livein_iterator and make
Dan Gohman [Tue, 13 Apr 2010 16:57:55 +0000 (16:57 +0000)]
Eliminate MachineBasicBlock::const_livein_iterator and make
MachineBasicBlock::livein_iterator a const_iterator, because
clients shouldn't ever be using the iterator interface to
mutate the livein set.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101147 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRename MachineFrameInfo variables to MFI, for consistency with
Dan Gohman [Tue, 13 Apr 2010 16:56:45 +0000 (16:56 +0000)]
Rename MachineFrameInfo variables to MFI, for consistency with
the rest of CodeGen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101146 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMove MachineRegisterInfo's isLiveIn and isLiveOut out of line.
Dan Gohman [Tue, 13 Apr 2010 16:55:37 +0000 (16:55 +0000)]
Move MachineRegisterInfo's isLiveIn and isLiveOut out of line.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101145 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUse MachineBasicBlock::isLiveIn.
Dan Gohman [Tue, 13 Apr 2010 16:53:51 +0000 (16:53 +0000)]
Use MachineBasicBlock::isLiveIn.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101144 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDelete an unused member variable.
Dan Gohman [Tue, 13 Apr 2010 16:51:39 +0000 (16:51 +0000)]
Delete an unused member variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101143 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTeach ScalarEvolution to simplify smax and umax when it can prove
Dan Gohman [Tue, 13 Apr 2010 16:51:03 +0000 (16:51 +0000)]
Teach ScalarEvolution to simplify smax and umax when it can prove
that one operand is always greater than another.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101142 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMinor code micro-optimizations.
Dan Gohman [Tue, 13 Apr 2010 16:49:23 +0000 (16:49 +0000)]
Minor code micro-optimizations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101141 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoActually... return after the check for invalid input.
Eric Christopher [Tue, 13 Apr 2010 16:41:29 +0000 (16:41 +0000)]
Actually... return after the check for invalid input.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101139 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoBumpPtrAllocator::Reset() doesn't need to allocate anything. (Thanks, Jakob)
Benjamin Kramer [Tue, 13 Apr 2010 16:38:06 +0000 (16:38 +0000)]
BumpPtrAllocator::Reset() doesn't need to allocate anything. (Thanks, Jakob)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101138 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUpdate unittest for allocator laziness.
Benjamin Kramer [Tue, 13 Apr 2010 15:01:26 +0000 (15:01 +0000)]
Update unittest for allocator laziness.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101131 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoLet BumpPtrAllocator lazily allocate the first slab.
Benjamin Kramer [Tue, 13 Apr 2010 14:41:51 +0000 (14:41 +0000)]
Let BumpPtrAllocator lazily allocate the first slab.

We have some code in llvm and clang where a BumpPtrAllocator is declared in a
class but never used in the common case. Stop wasting memory there.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101130 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove SCCVN from the CMake build system.
Owen Anderson [Tue, 13 Apr 2010 08:33:09 +0000 (08:33 +0000)]
Remove SCCVN from the CMake build system.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101125 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agocheckpoint.
Chris Lattner [Tue, 13 Apr 2010 06:37:00 +0000 (06:37 +0000)]
checkpoint.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101118 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSCCVN, we hardly knew ye!
Owen Anderson [Tue, 13 Apr 2010 05:24:08 +0000 (05:24 +0000)]
SCCVN, we hardly knew ye!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101117 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix PR6826: GraphWriter delete the generated file before "dotty" load it,
Chris Lattner [Tue, 13 Apr 2010 04:35:39 +0000 (04:35 +0000)]
Fix PR6826: GraphWriter delete the generated file before "dotty" load it,
patch by 'ether'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101116 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoReplace r101053 with a fix for getSOImmValRotate() so that it will correctly
Bob Wilson [Tue, 13 Apr 2010 02:11:48 +0000 (02:11 +0000)]
Replace r101053 with a fix for getSOImmValRotate() so that it will correctly
recognize all the valid rotated immediates.  This fixes the disassembler
issue and will also help codegen for some unusual constant values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101114 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTeach IndVarSimplify how to eliminate remainder operators where the
Dan Gohman [Tue, 13 Apr 2010 01:46:36 +0000 (01:46 +0000)]
Teach IndVarSimplify how to eliminate remainder operators where the
numerator is an induction variable. For example, with code like this:

  for (i=0;i<n;++i)
    x[i%n] = 0;

IndVarSimplify will now recognize that i is always less than n inside
the loop, and eliminate the remainder.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101113 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoVMCore: Add Type::getIntN[Ptr]Ty, which are the obvious generic forms of
Daniel Dunbar [Tue, 13 Apr 2010 01:39:07 +0000 (01:39 +0000)]
VMCore: Add Type::getIntN[Ptr]Ty, which are the obvious generic forms of
Type::getInt{1,8,...}[Ptr]Ty, so code can consistently use the methods on Type
without occasionally needed to call IntegerType::get.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101111 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoIRBuilder: Add Create{Shl,LShr,And,Or,Xor} methods from uin64_t and APInt constants.
Daniel Dunbar [Tue, 13 Apr 2010 01:38:57 +0000 (01:38 +0000)]
IRBuilder: Add Create{Shl,LShr,And,Or,Xor} methods from uin64_t and APInt constants.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101110 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd llvm codegen support for -ffunction-sections and -fdata-sections,
Chris Lattner [Tue, 13 Apr 2010 00:36:43 +0000 (00:36 +0000)]
add llvm codegen support for -ffunction-sections and -fdata-sections,
patch by Sylvere Teissier!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101106 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoBuild system fix to make llvm-mc properly build
Sean Callanan [Mon, 12 Apr 2010 23:55:28 +0000 (23:55 +0000)]
Build system fix to make llvm-mc properly build
after edis.  Really, there ought to be some
mechanism to ensure that PARALLEL_DIRS get built
after DIRS.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101095 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMicro-optimize a few hot spots.
Dan Gohman [Mon, 12 Apr 2010 23:08:18 +0000 (23:08 +0000)]
Micro-optimize a few hot spots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101086 91177308-0d34-0410-b5e6-96231b3b80d8