Commit Graph

48507 Commits

Author SHA1 Message Date
Chris Lattner
e2959dc2b1 clean up some syntax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75532 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 22:28:21 +00:00
Eli Friedman
709b33dc78 Canonicalize boolean +/- a constant to a select.
(I think it's reasonably clear that we want to have a canonical form for 
constructs like this; if anyone thinks that a select is not the best 
canonical form, please tell me.)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75531 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 22:27:52 +00:00
Dan Gohman
ddf9f99a9f Fix a few assertion strings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75530 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 22:20:53 +00:00
Dan Gohman
03ee68a145 Forward-declare Loop and LoopInfo instead of #including LoopInfo.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75529 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 22:19:41 +00:00
Owen Anderson
fa82b6eba4 These don't really need contexts either.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75528 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 22:18:28 +00:00
Daniel Dunbar
0c39e3839a NewNightlyTest.pl - Add -noremoveatend option.
- Like -noremove, except the build directory is still purged prior to building
   but isn't removed at the end of the test run (so the build products can be
   examined if need be).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75527 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 22:17:49 +00:00
Chris Lattner
62c5c5099c eliminate a bunch of code in print_pcrel_imm for printing symbols, using
printSymbolOperand instead.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75526 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 22:07:30 +00:00
Dan Gohman
f5074ec963 Whitespace cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75525 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 22:05:32 +00:00
Dan Gohman
ba70188f89 Fix an 80-column violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75524 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 22:04:06 +00:00
Dan Gohman
16a2c927e9 Move isLCSSAForm, isLoopInvariant, getCanonicalInductionVariable,
and related functions out of LoopBase and into Loop, since they
are specific to BasicBlock-based loops. This also allows the code
to be moved out-of-line.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75523 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 22:02:44 +00:00
Oscar Fuentes
6761c5d609 CMake: Refuses to work for out-of-source builds when tablegenned files
are found mixed with the sources. Fixes PR 4522.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75522 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 21:58:44 +00:00
Chris Lattner
f666c094e9 move a method and add a comment, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75520 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 21:53:19 +00:00
Dan Gohman
c8d76d5afb Make Loop and MachineLoop be subclasses of LoopBase, rather than typedefs,
using the Curiously Recurring Template Pattern with LoopBase.

This will help further refactoring, and future functionality for
Loop. Also, Headers can now foward-declare Loop, instead of pulling
in LoopInfo.h or doing tricks.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75519 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 21:51:15 +00:00
Chris Lattner
92aa0bb4ca refactor operand printing to remove hte last of the "mem" modifier hack. The
only remaining modifier is "subreg".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75516 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 21:48:33 +00:00
Devang Patel
87370b8301 Use AsmPrinter's Mangler to remove leading '1' from linkage names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75515 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 21:48:26 +00:00
Eli Friedman
65445c5b14 Misc simplifications to InstCombiner::commonIntCastTransforms. Most of
the changes are allowed by not calling this function for bitcasts.  
The Instruction::AShr case is dead because 
SimplifyDemandedInstructionBits handles that case.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75514 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 21:45:57 +00:00
David Goodwin
ea670f1dd8 Fix FP elimination code to work for Thumb-2 addrmode AddrModeT2_so. This fixes SingleSource/Benchmarks/Stanford/Queens (among others).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75513 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 21:43:08 +00:00
Chris Lattner
174f816f30 refactor symbol printing so the whole "mem" thing is handled in fewer places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75512 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 21:41:08 +00:00
Dan Gohman
85b05a2e60 Reapply 75252, with a fix to avoid the infinite recursion case. The
check for avoiding re-analyzing a widening cast needed to happen
earlier, as getSCEV itself may result in a isLoopGuardedByCond query.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75511 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 21:35:55 +00:00
Oscar Fuentes
d97ea308ed CMake: tablegen: Add .td files under the inlude/llvm directory
hierarchy to the list of dependencies.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75510 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 21:35:00 +00:00
Owen Anderson
1ca29d318a As Chris pointed out, this doesn't actually need an LLVMContext to operate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75508 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 21:27:19 +00:00
Devang Patel
43da8fbe52 revert rev. 75503 for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75507 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 21:26:33 +00:00
Devang Patel
7597a6252b Use Mangler to remove leading '1' from linkage names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75503 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 21:19:56 +00:00
Kevin Enderby
a5c783280f add llvm-mc support for parsing the .subsections_via_symbols directive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75500 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 21:03:15 +00:00
Eli Friedman
eb7f7a8665 Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75499 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 20:58:59 +00:00
Owen Anderson
73c6b7127a Move more functionality over to LLVMContext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75497 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 20:58:05 +00:00
Dan Gohman
69fbc7f477 Move the memoization check for SCEVSignExtendExpr and
SCEVZeroExtendExpr ahead of the most expensive analysis. This
speeds up analysis and helps avoid pathologically bad behavior
on the testcase in PR4534.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75496 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 20:55:53 +00:00
Eli Friedman
7e25d45cfb Don't bother to call commonIntCastTransforms for bitcasts; int->int
bitcasts will always be eliminated anyway.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75495 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 20:53:00 +00:00
Dan Gohman
c050fd94c2 Convert SCEV from FoldingSetNode to FastFoldingSetNode. This eliminates
a bunch of redundent code in Profile methods, and prepares for upcoming
changes to do improved memoization.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75494 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 20:50:19 +00:00
Dan Gohman
2e4da5e4ab Delete a spurious const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75493 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 20:46:11 +00:00
Bill Wendling
db425496a6 Reverted r75484. It was causing a failure with Apple-style builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75491 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 20:27:41 +00:00
David Greene
014700c1a8 Add infrastructure to allow post instruction printing action triggers.
We'll eventually use this to print comments in asm files and do other
fun things.

This adds interfaces to the AsmPrinter and changes TableGen to invoke
the postInstructionAction when appropriate.  It also add parameters to
TargetAsmInfo to control comment layout.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75490 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 20:25:48 +00:00
Chris Lattner
b8ac841c9a Add NetBSD to the Triple class, patch by Krister Walfridsson!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75489 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 20:22:23 +00:00
Bill Wendling
892838336c More standard way of specifying greater than Leopard.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75488 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 20:18:43 +00:00
Bill Wendling
b6be139c50 On greater than Leopard systems, place exception tables in the __TEXT section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75484 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 18:48:39 +00:00
Daniel Dunbar
c464e51127 Makefile rules for generating assembly matcher.
- Unused, fear not cmakers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75483 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 18:35:35 +00:00
Dan Gohman
beca6896b9 Change printInstruction to not print a trailing newline. Value::dump
always adds a newline, so this fixes Value::dump printing an
extra blank line.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75481 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 18:27:59 +00:00
Dan Gohman
d6a2aab53e Add an optional optimization to FoldingSet to allow ID values to be
stored rather than recomputed on each bucket traversal.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75480 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 18:25:44 +00:00
Bob Wilson
d2559bf3f3 Fix comment typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75479 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 18:11:36 +00:00
Chris Lattner
a2f55dd388 factor the 'optimized sort' code out into a static helper function
and use it from one more place.  Patch by Jakub Staszak!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75478 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 17:20:05 +00:00
Chris Lattner
6fbc1969e9 Move the re-sort of invalidated NonLocalPointerDeps cache earlier
so that all code paths get it.  PR4256 was about a case where the
phi translation loop would find all preds in the Visited cache, so
it could get by without re-sorting the NonLocalPointerDeps cache.
Fix this by resorting it earlier, there is no reason not to do this.

This patch inspired by Jakub Staszak's patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75476 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 17:14:23 +00:00
David Greene
191cf2851b Make some more changes suggested by Chris. Manipulators go away.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75472 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 16:49:27 +00:00
Sanjiv Gupta
b134bc31be Added a fixme for platform specific GetDirSeparator().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75461 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 10:58:55 +00:00
Sanjiv Gupta
f935dcc26a allow mcc16 users to specify --save-temps even though it is hidden by mcc16.
link libstd.so with llvm-ld by default with all the programs user is trying to build.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75460 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 10:56:29 +00:00
Daniel Dunbar
7a80f5f825 Match declaration to definition (missed a few).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75456 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 06:04:06 +00:00
Daniel Dunbar
ac27baa8b1 Tweak svn:ignore
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75455 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 06:00:39 +00:00
Daniel Dunbar
89e12a1b2e Match declaration to definition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75454 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 06:00:13 +00:00
Nick Lewycky
56a96e76ae Fix build on Linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75453 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 05:49:04 +00:00
Daniel Dunbar
4892cb761e Fix some non-sensical code.
- This makes it more like other similar code in Archive handling.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75452 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 05:29:34 +00:00
Daniel Dunbar
a53902b258 Switch to raw_ostream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75451 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 05:27:30 +00:00