Chris Lattner
f34815b32f
Change the internal interface to makeNameProper to take a bool that
...
indicates whether the label is private or not, instead of taking
prefix stuff. One effect of this is that symbols will be generated
with *just* the private prefix, instead of both the private prefix
*and* the user-label-prefix, but this doesn't matter as long as it
is consistent. For example we'll now get "Lfoo" instead of "L_foo".
These are just assembler temporary labels anyway, so they never even
make it into the .o file.
llvm-svn: 75607
2009-07-14 04:50:12 +00:00
Lang Hames
69008332bd
Unbroke LiveInterval.
...
llvm-svn: 75588
2009-07-14 02:17:17 +00:00
Lang Hames
6d04975ccb
Tidy up VNInfo alignment code. Patch contributed by Ryan Flynn.
...
llvm-svn: 75587
2009-07-14 02:05:37 +00:00
Eli Friedman
14379df4e6
Fix trivial todo in instcombine.
...
llvm-svn: 75586
2009-07-14 02:01:53 +00:00
Evan Cheng
bd9ba429ca
1. In Thumb mode, select tBx instead of ARM variants.
...
2. BX does not "use" the link register, it defines it.
3. Fix a couple more places in thumb td file that still uses pre-UAL syntax.
llvm-svn: 75585
2009-07-14 01:49:27 +00:00
Dan Gohman
4d6149f356
Update LoopSimplify and LoopUnswitch to use the new makeLoopInvariant
...
function.
llvm-svn: 75584
2009-07-14 01:37:59 +00:00
Dan Gohman
734759e5db
Port this unittest to use LLVMContext.
...
llvm-svn: 75583
2009-07-14 01:26:26 +00:00
Bill Wendling
b1f9128c72
Remove hack now that Evan fixed it so that the frame pointer isn't saved twice.
...
llvm-svn: 75581
2009-07-14 01:16:18 +00:00
Dan Gohman
03d5d0f451
Fix indvars to not assume that a loop with a single unique exit
...
block has a single unique exiting block.
llvm-svn: 75579
2009-07-14 01:09:02 +00:00
Dan Gohman
6f6d864815
Introduce a new LoopInfo utility function makeLoopInvariant, which
...
works similar to isLoopInvariant, except that it will do trivial
hoisting to try to make the value loop invariant if it isn't already.
This makes it easier for transformation passes to clear trivial
instructions out of the way (the regular LICM pass doesn't run
until relatively late). This is code factored out of LoopSimplify
and other places.
llvm-svn: 75578
2009-07-14 01:06:29 +00:00
Chris Lattner
fc4b5cb7a6
use getValueName instead of makeNameProper.
...
llvm-svn: 75577
2009-07-14 01:01:12 +00:00
David Goodwin
72b80ac9b1
Fix detection of valid BFC immediates.
...
llvm-svn: 75576
2009-07-14 00:57:56 +00:00
Devang Patel
cdfc858ec0
Do not use Mangler to remove '1' from linkage name.
...
llvm-svn: 75574
2009-07-14 00:55:28 +00:00
Bill Wendling
e604b776a7
Check for the correct unnamed name.
...
llvm-svn: 75573
2009-07-14 00:53:58 +00:00
Evan Cheng
26bed68f5b
Fix pr4544. When remating, make sure the destination register fits the instruction definition. It may be mismatched due to sub-register coalescing.
...
No test case yet because the code doesn't trigger until 75408 is re-applied.
llvm-svn: 75572
2009-07-14 00:51:06 +00:00
Dale Johannesen
85ae7480d9
Don't delete asm's just because their inputs are undefined;
...
xor R, R is a common and valid idiom for zeroing a register, for example.
llvm-svn: 75571
2009-07-14 00:45:38 +00:00
Dan Gohman
f2c9922f50
Add a newline, now that Value's operator<< doesn't print one.
...
llvm-svn: 75568
2009-07-14 00:32:49 +00:00
Dan Gohman
8da86eb274
FreeInst is trapping.
...
llvm-svn: 75567
2009-07-14 00:32:11 +00:00
Bob Wilson
7bbb9a91ab
Fix an obvious copy-and-paste error.
...
llvm-svn: 75566
2009-07-14 00:23:44 +00:00
Bob Wilson
c6026b5198
Revert 75308.
...
llvm-svn: 75565
2009-07-14 00:16:03 +00:00
Chris Lattner
05f1976aba
the mangler can never mangle intrinsics, don't allow this.
...
llvm-svn: 75564
2009-07-14 00:15:14 +00:00
Eli Friedman
2976318bb2
Fix obvious typo.
...
llvm-svn: 75563
2009-07-14 00:09:42 +00:00
Bob Wilson
acb9927fd8
Revert 75309.
...
llvm-svn: 75562
2009-07-14 00:01:42 +00:00
Chris Lattner
105efaf3df
rename Memo/Count to AnonGlobalIDs/NextAnonGlobalID to be more
...
descriptive. Thange them to keep track of the ID of a global that is
assigned, not the first mangled name returned for it. Without doing this,
we are required to always use the same suffix for a global that gets
mangled. This means that we can mangle the same global once with $stub
and another time with $non_lazy_ptr or whatever.
llvm-svn: 75561
2009-07-14 00:01:06 +00:00
Owen Anderson
3e42e9f2fc
Move more functionality over to LLVMContext.
...
llvm-svn: 75559
2009-07-13 23:50:59 +00:00
Chris Lattner
327387156a
remove Mangler::getTypeID and related data, it was only used for mangling
...
local symbols and we haven't had type planes since llvm 1.9.
llvm-svn: 75558
2009-07-13 23:50:53 +00:00
Chris Lattner
15c6d8779b
remove mangler support for mangling local names. Mangler should only be
...
used with globals.
llvm-svn: 75557
2009-07-13 23:47:27 +00:00
Chris Lattner
874727fb73
fix CBE & MSIL backends to not use the mangler for non-global symbols.
...
llvm-svn: 75556
2009-07-13 23:46:46 +00:00
Chris Lattner
d8435e9989
don't print redundant @PLT suffixes
...
llvm-svn: 75554
2009-07-13 23:44:13 +00:00
Evan Cheng
6698ab9ade
Revert an accidental commit.
...
llvm-svn: 75553
2009-07-13 23:44:01 +00:00
Chris Lattner
cf485bd781
the mangler should put suffixes on unnamed global's mangled names as well
...
if present.
llvm-svn: 75547
2009-07-13 23:20:38 +00:00
Owen Anderson
13c240a4c1
Move a bit more functionality to LLVMContext, which apparently wasn't being used anyways.
...
llvm-svn: 75546
2009-07-13 23:16:26 +00:00
Kevin Enderby
56523ceba1
Added llvm-mc support for parsing the .abort directive.
...
llvm-svn: 75545
2009-07-13 23:15:14 +00:00
Dan Gohman
dbaddda21f
Check in a reduced version of this testcase.
...
llvm-svn: 75544
2009-07-13 23:04:44 +00:00
Dan Gohman
fda3c4ac89
Print a newline after printing a Value, now that Value's operator<<
...
doesn't print a newline.
llvm-svn: 75543
2009-07-13 23:03:05 +00:00
Dan Gohman
e2d31aa132
#include "llvm/Assembly/Writer.h" to get the declaration for WriteAsOperand.
...
llvm-svn: 75542
2009-07-13 22:56:37 +00:00
Chris Lattner
ec8efcb44e
Two changes:
...
1) unique globals with the existing "Count" local in Mangler, not with
atomic nonsense. Using atomics will give us nondeterminstic output
from the compiler when using multiple threads, which is bad.
2) Do not mangle an unknown global name with a type suffix. We don't
need this anymore now that llvm ir doesn't have type planes.
llvm-svn: 75541
2009-07-13 22:48:46 +00:00
Devang Patel
9efced9817
Use assertion.
...
llvm-svn: 75540
2009-07-13 22:46:19 +00:00
Eli Friedman
4b95026194
PR4548: optimize zext+udiv+trunc to udiv.
...
llvm-svn: 75539
2009-07-13 22:46:01 +00:00
Owen Anderson
85f86dc058
Inline EvalVectorOp in order to get rid of passing-pointer-to-static-methods behavior.
...
llvm-svn: 75538
2009-07-13 22:41:06 +00:00
Bruno Cardoso Lopes
ffb38f8d35
Cleanup the global emission and refactor some code
...
llvm-svn: 75537
2009-07-13 22:40:39 +00:00
Owen Anderson
b258410a1b
Fix the build.
...
llvm-svn: 75536
2009-07-13 22:40:32 +00:00
Daniel Dunbar
e12dcd976d
NewNightlyTest.pl - Add -configure-args option.
...
- For adding arbitrary arguments to pass to configure.
llvm-svn: 75535
2009-07-13 22:31:58 +00:00
Eli Friedman
116e3b3ef1
Fix bug in run-line.
...
llvm-svn: 75534
2009-07-13 22:31:30 +00:00
Dan Gohman
054d2a7837
Add testcases for PR4538, PR4537, and PR4534.
...
llvm-svn: 75533
2009-07-13 22:30:31 +00:00
Chris Lattner
a45c9b67cc
clean up some syntax.
...
llvm-svn: 75532
2009-07-13 22:28:21 +00:00
Eli Friedman
7e1716dc9d
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.)
llvm-svn: 75531
2009-07-13 22:27:52 +00:00
Dan Gohman
dd707af345
Fix a few assertion strings.
...
llvm-svn: 75530
2009-07-13 22:20:53 +00:00
Dan Gohman
6a9bb1397f
Forward-declare Loop and LoopInfo instead of #including LoopInfo.h.
...
llvm-svn: 75529
2009-07-13 22:19:41 +00:00
Owen Anderson
bb2501bbbe
These don't really need contexts either.
...
llvm-svn: 75528
2009-07-13 22:18:28 +00:00
Daniel Dunbar
4f57d77e40
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).
llvm-svn: 75527
2009-07-13 22:17:49 +00:00
Chris Lattner
f8542ba3a9
eliminate a bunch of code in print_pcrel_imm for printing symbols, using
...
printSymbolOperand instead.
llvm-svn: 75526
2009-07-13 22:07:30 +00:00
Dan Gohman
fc7699405c
Whitespace cleanups.
...
llvm-svn: 75525
2009-07-13 22:05:32 +00:00
Dan Gohman
e6b4babcbb
Fix an 80-column violation.
...
llvm-svn: 75524
2009-07-13 22:04:06 +00:00
Dan Gohman
80a9942593
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.
llvm-svn: 75523
2009-07-13 22:02:44 +00:00
Oscar Fuentes
304396a8c3
CMake: Refuses to work for out-of-source builds when tablegenned files
...
are found mixed with the sources. Fixes PR 4522.
llvm-svn: 75522
2009-07-13 21:58:44 +00:00
Chris Lattner
40091b8cef
move a method and add a comment, no functionality change.
...
llvm-svn: 75520
2009-07-13 21:53:19 +00:00
Dan Gohman
cc85ae132c
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.
llvm-svn: 75519
2009-07-13 21:51:15 +00:00
Chris Lattner
a479bf1afa
refactor operand printing to remove hte last of the "mem" modifier hack. The
...
only remaining modifier is "subreg".
llvm-svn: 75516
2009-07-13 21:48:33 +00:00
Devang Patel
9d582d1782
Use AsmPrinter's Mangler to remove leading '1' from linkage names.
...
llvm-svn: 75515
2009-07-13 21:48:26 +00:00
Eli Friedman
42170b0a9e
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.
llvm-svn: 75514
2009-07-13 21:45:57 +00:00
David Goodwin
160521095b
Fix FP elimination code to work for Thumb-2 addrmode AddrModeT2_so. This fixes SingleSource/Benchmarks/Stanford/Queens (among others).
...
llvm-svn: 75513
2009-07-13 21:43:08 +00:00
Chris Lattner
bf25a209dc
refactor symbol printing so the whole "mem" thing is handled in fewer places.
...
llvm-svn: 75512
2009-07-13 21:41:08 +00:00
Dan Gohman
e65c917ecf
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.
llvm-svn: 75511
2009-07-13 21:35:55 +00:00
Oscar Fuentes
cb234fec50
CMake: tablegen: Add .td files under the inlude/llvm directory
...
hierarchy to the list of dependencies.
llvm-svn: 75510
2009-07-13 21:35:00 +00:00
Owen Anderson
e4dcecd006
As Chris pointed out, this doesn't actually need an LLVMContext to operate.
...
llvm-svn: 75508
2009-07-13 21:27:19 +00:00
Devang Patel
b4c9579e69
revert rev. 75503 for now.
...
llvm-svn: 75507
2009-07-13 21:26:33 +00:00
Devang Patel
31b3d7b53f
Use Mangler to remove leading '1' from linkage names.
...
llvm-svn: 75503
2009-07-13 21:19:56 +00:00
Kevin Enderby
c9d93ef2c6
add llvm-mc support for parsing the .subsections_via_symbols directive.
...
llvm-svn: 75500
2009-07-13 21:03:15 +00:00
Eli Friedman
7f3a529ae9
Fix comment.
...
llvm-svn: 75499
2009-07-13 20:58:59 +00:00
Owen Anderson
542619e6d5
Move more functionality over to LLVMContext.
...
llvm-svn: 75497
2009-07-13 20:58:05 +00:00
Dan Gohman
74a0ba15d3
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.
llvm-svn: 75496
2009-07-13 20:55:53 +00:00
Eli Friedman
f13aa44d4f
Don't bother to call commonIntCastTransforms for bitcasts; int->int
...
bitcasts will always be eliminated anyway.
llvm-svn: 75495
2009-07-13 20:53:00 +00:00
Dan Gohman
3a302cbb08
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.
llvm-svn: 75494
2009-07-13 20:50:19 +00:00
Dan Gohman
ce93e419c0
Delete a spurious const.
...
llvm-svn: 75493
2009-07-13 20:46:11 +00:00
Bill Wendling
e3ac197457
Reverted r75484. It was causing a failure with Apple-style builds.
...
llvm-svn: 75491
2009-07-13 20:27:41 +00:00
David Greene
de54478bf0
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.
llvm-svn: 75490
2009-07-13 20:25:48 +00:00
Chris Lattner
01218d5b17
Add NetBSD to the Triple class, patch by Krister Walfridsson!
...
llvm-svn: 75489
2009-07-13 20:22:23 +00:00
Bill Wendling
1b7661e588
More standard way of specifying greater than Leopard.
...
llvm-svn: 75488
2009-07-13 20:18:43 +00:00
Bill Wendling
0a860df8ef
On greater than Leopard systems, place exception tables in the __TEXT section.
...
llvm-svn: 75484
2009-07-13 18:48:39 +00:00
Daniel Dunbar
2841ea4749
Makefile rules for generating assembly matcher.
...
- Unused, fear not cmakers.
llvm-svn: 75483
2009-07-13 18:35:35 +00:00
Dan Gohman
a4f709ee5a
Change printInstruction to not print a trailing newline. Value::dump
...
always adds a newline, so this fixes Value::dump printing an
extra blank line.
llvm-svn: 75481
2009-07-13 18:27:59 +00:00
Dan Gohman
b3c1afc14b
Add an optional optimization to FoldingSet to allow ID values to be
...
stored rather than recomputed on each bucket traversal.
llvm-svn: 75480
2009-07-13 18:25:44 +00:00
Bob Wilson
844d6c82a7
Fix comment typos.
...
llvm-svn: 75479
2009-07-13 18:11:36 +00:00
Chris Lattner
370aadabfc
factor the 'optimized sort' code out into a static helper function
...
and use it from one more place. Patch by Jakub Staszak!
llvm-svn: 75478
2009-07-13 17:20:05 +00:00
Chris Lattner
2f0c1c44d5
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.
llvm-svn: 75476
2009-07-13 17:14:23 +00:00
David Greene
20f6ac0738
Make some more changes suggested by Chris. Manipulators go away.
...
llvm-svn: 75472
2009-07-13 16:49:27 +00:00
Sanjiv Gupta
63bdb56274
Added a fixme for platform specific GetDirSeparator().
...
llvm-svn: 75461
2009-07-13 10:58:55 +00:00
Sanjiv Gupta
ed5db9dd30
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.
llvm-svn: 75460
2009-07-13 10:56:29 +00:00
Daniel Dunbar
3a86fe943c
Match declaration to definition (missed a few).
...
llvm-svn: 75456
2009-07-13 06:04:06 +00:00
Daniel Dunbar
334f808562
Match declaration to definition.
...
llvm-svn: 75454
2009-07-13 06:00:13 +00:00
Nick Lewycky
c07adb7b0b
Fix build on Linux.
...
llvm-svn: 75453
2009-07-13 05:49:04 +00:00
Daniel Dunbar
78be93acb3
Fix some non-sensical code.
...
- This makes it more like other similar code in Archive handling.
llvm-svn: 75452
2009-07-13 05:29:34 +00:00
Daniel Dunbar
763ace92c0
Switch to raw_ostream.
...
llvm-svn: 75451
2009-07-13 05:27:30 +00:00
Lang Hames
43edca25b3
Removed some junk code that snuck in to an earlier commit.
...
llvm-svn: 75450
2009-07-13 05:01:19 +00:00
Nick Lewycky
571bf54569
Fix an error in ConstantRange::getSignedMax on wrapped ranges. Thanks once
...
again to Daniel Dunbar and KLEE!
llvm-svn: 75449
2009-07-13 04:50:21 +00:00
Nick Lewycky
5edc459220
'i8 full-range' sign extended to i16 should equal [-128, 128) not [-128, 127).
...
Found by Daniel Dunbar and KLEE.
llvm-svn: 75448
2009-07-13 04:17:23 +00:00
Owen Anderson
53a52215b5
Begin the painful process of tearing apart the rat'ss nest that is Constants.cpp and ConstantFold.cpp.
...
This involves temporarily hard wiring some parts to use the global context. This isn't ideal, but it's
the only way I could figure out to make this process vaguely incremental.
llvm-svn: 75445
2009-07-13 04:09:18 +00:00
Nick Lewycky
5302389442
Multiply was very wrong for wrapped ranges. This supplies a half-fix that will
...
generally return Full on all wrapped inputs. "Fixes" PR4545.
llvm-svn: 75444
2009-07-13 03:27:41 +00:00
Nick Lewycky
73b704dd9c
Fix a bug summing two full sets. The overflow checking doesn't handle sets as
...
large as the full set, only those one size smaller. Thanks to Daniel Dunbar
who found this bug using Klee!
llvm-svn: 75443
2009-07-13 02:49:08 +00:00