Chris Lattner [Wed, 11 Nov 2009 22:48:44 +0000 (22:48 +0000)]
make LazyValueInfo actually to some stuff. This isn't very tested but improves
strswitch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86889
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 11 Nov 2009 22:31:38 +0000 (22:31 +0000)]
pass TD into a SimplifyCmpInst call. Add another case that
uses LVI info when -enable-jump-threading-lvi is passed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86886
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 11 Nov 2009 21:57:02 +0000 (21:57 +0000)]
Promote MergePotentialsElt and SameTailElt to be regular classes
instead of typedefs for std::pair. This simplifies the type of
SameTails, which previously was std::vector<std::pair<std::vector<std::pair<unsigned, MachineBasicBlock *> >::iterator, MachineBasicBlock::iterator>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86885
91177308-0d34-0410-b5e6-
96231b3b80d8
Kenneth Uildriks [Wed, 11 Nov 2009 19:59:24 +0000 (19:59 +0000)]
x86 users can now return arbitrary sized structs. Structs too large to fit in return registers will be returned through a hidden sret parameter introduced during SelectionDAG construction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86876
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 11 Nov 2009 19:56:05 +0000 (19:56 +0000)]
Revert this line of 86871.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86875
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 11 Nov 2009 19:55:08 +0000 (19:55 +0000)]
If doesSupportDebugInformation() is false then do not try to emit dwarf debug info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86874
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 11 Nov 2009 19:49:34 +0000 (19:49 +0000)]
Check in the changes to this file too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86873
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 11 Nov 2009 19:48:59 +0000 (19:48 +0000)]
Add support for tail duplication to BranchFolding, and extend
tail merging support to handle more cases.
- Recognize several cases where tail merging is beneficial even when
the tail size is smaller than the generic threshold.
- Make use of MachineInstrDesc::isBarrier to help detect
non-fallthrough blocks.
- Check for and avoid disrupting fall-through edges in more cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86871
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 11 Nov 2009 19:31:31 +0000 (19:31 +0000)]
Fix liveness calculation when splitting critical edges during PHI elimination.
- Edges are split before any phis are eliminated, so the code is SSA.
- Create a proper IR BasicBlock for the split edges.
- LiveVariables::addNewBlock now has same syntax as
MachineDominatorTree::addNewBlock. Algorithm calculates predecessor live-out
set rather than successor live-in set.
This feature still causes some miscompilations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86867
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 11 Nov 2009 19:08:42 +0000 (19:08 +0000)]
Reenable StackTracke.cpp test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86861
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 11 Nov 2009 19:06:06 +0000 (19:06 +0000)]
Add SetDebugLocation() variant to
add debug info location to an instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86859
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 11 Nov 2009 19:05:52 +0000 (19:05 +0000)]
Add TargetLowering::isLegalICmpImmediate. It tells LSR what immediate can be folded into target icmp instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86858
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 11 Nov 2009 19:04:24 +0000 (19:04 +0000)]
Do jump table adjustment before constant island allocation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86857
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 11 Nov 2009 18:42:28 +0000 (18:42 +0000)]
Fix indentation level.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86856
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 11 Nov 2009 18:38:14 +0000 (18:38 +0000)]
Whitespace cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86855
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 11 Nov 2009 18:23:17 +0000 (18:23 +0000)]
Prefix MBB numbers with "BB#" in debug output to make it clear what
the numbers mean.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86854
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 11 Nov 2009 18:18:34 +0000 (18:18 +0000)]
Minor code simplification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86853
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 11 Nov 2009 18:14:02 +0000 (18:14 +0000)]
Fix a copy+pasto in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86852
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 11 Nov 2009 18:11:07 +0000 (18:11 +0000)]
Set isBarrier = 1 on return instructions, as they are control barriers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86851
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 11 Nov 2009 18:07:16 +0000 (18:07 +0000)]
Use a tab in INT3's asm string, for consistency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86850
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 11 Nov 2009 17:54:02 +0000 (17:54 +0000)]
another const prop failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86848
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 11 Nov 2009 17:51:27 +0000 (17:51 +0000)]
add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86847
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 11 Nov 2009 17:37:02 +0000 (17:37 +0000)]
Reject duplicate case values in a switch, PR5450.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86846
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 11 Nov 2009 15:34:13 +0000 (15:34 +0000)]
Don't trivially delete unused calls to llvm.invariant.start. This allows
llvm.invariant.start to be used without necessarily being paired with a call
to llvm.invariant.end. If you run the entire optimization pipeline then such
calls are in fact deleted (adce does it), but that's actually a good thing since
we probably do want them to be zapped late in the game. There should really be
an integration test that checks that the llvm.invariant.start call lasts long
enough that all passes that do interesting things with it get to do their stuff
before it is deleted. But since no passes do anything interesting with it yet
this will have to wait for later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86840
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 11 Nov 2009 07:11:02 +0000 (07:11 +0000)]
Add nounwind.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86814
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 11 Nov 2009 05:56:35 +0000 (05:56 +0000)]
remove the now dead condprop pass, PR3906.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86810
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Wed, 11 Nov 2009 05:30:02 +0000 (05:30 +0000)]
Fix JITTest.ModuleDeletion in -Asserts mode (which turns off JITEmitDebugInfo
by default).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86807
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 11 Nov 2009 05:25:16 +0000 (05:25 +0000)]
remove condprop testcases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86804
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 11 Nov 2009 05:19:11 +0000 (05:19 +0000)]
Add StringRef::split(StringRef), to complement StringRef::split(char).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86803
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 11 Nov 2009 04:10:24 +0000 (04:10 +0000)]
Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86802
91177308-0d34-0410-b5e6-
96231b3b80d8
Sandeep Patel [Wed, 11 Nov 2009 03:23:46 +0000 (03:23 +0000)]
Show command-line args and features passed into backend in debug output. Approved by Evan Cheng.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86797
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 11 Nov 2009 03:10:03 +0000 (03:10 +0000)]
Add missing run line. Devang, please check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86795
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 11 Nov 2009 03:09:50 +0000 (03:09 +0000)]
Fix -Asserts warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86794
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 11 Nov 2009 02:47:19 +0000 (02:47 +0000)]
The TBB and TBH instructions for Thumb2 are really handy for jump tables, but
can only branch forward. To best take advantage of them, we'd like to adjust
the basic blocks around a bit when reasonable. This patch puts basics in place
to do that, with a super-simple algorithm for backwards jump table targets that
creates a new branch after the jump table which branches backwards. Real
heuristics for reordering blocks or other modifications rather than inserting
branches will follow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86791
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 11 Nov 2009 02:08:33 +0000 (02:08 +0000)]
stub out some LazyValueInfo interfaces, and have JumpThreading
start using them in a trivial way when -enable-jump-threading-lvi
is passed. enable-jump-threading-lvi will be my playground for
awhile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86789
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 11 Nov 2009 01:44:22 +0000 (01:44 +0000)]
Fix test to work on every platform.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86786
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 11 Nov 2009 01:41:32 +0000 (01:41 +0000)]
Fix test to work on every platform.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86785
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 11 Nov 2009 01:41:10 +0000 (01:41 +0000)]
XFAIL for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86784
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 11 Nov 2009 01:24:59 +0000 (01:24 +0000)]
Make sure that the exception handling data has the same visibility as the
function it's generated for.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86779
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 11 Nov 2009 00:43:14 +0000 (00:43 +0000)]
Add Triple::str() which returns the contents of the Triple as a string, as a more readable alternative to getTriple().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86773
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 11 Nov 2009 00:31:36 +0000 (00:31 +0000)]
Do not assume first function scope seen represents current function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86771
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 11 Nov 2009 00:28:53 +0000 (00:28 +0000)]
Add From arguments to StringRef search functions, and tweak doxyments.
Also, add unittests for find_first_of and find_first_not_of.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86770
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 11 Nov 2009 00:28:38 +0000 (00:28 +0000)]
llvm-gcc/clang don't (won't?) need this hack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86769
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 11 Nov 2009 00:27:54 +0000 (00:27 +0000)]
oops, didn't mean to commit this, no harm, but add a todoops, didn't mean to commit this, no harm, but add a todoo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86768
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 11 Nov 2009 00:22:30 +0000 (00:22 +0000)]
Stub out a new lazy value info pass, which will eventually
vend value constraint information to the optimizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86767
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 11 Nov 2009 00:21:58 +0000 (00:21 +0000)]
add a fixme
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86766
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 11 Nov 2009 00:21:21 +0000 (00:21 +0000)]
remove redundant foward declaration. This function is already in
Analysis/Passes.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86765
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 11 Nov 2009 00:18:40 +0000 (00:18 +0000)]
While creating DbgScopes, do not forget parent scope.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86763
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 11 Nov 2009 00:00:21 +0000 (00:00 +0000)]
Block terminator may be a switch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86761
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Nov 2009 23:54:10 +0000 (23:54 +0000)]
jump threading does everything that condprop does any more. This passes
bootstrap on darwin i386.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86758
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Nov 2009 23:47:45 +0000 (23:47 +0000)]
add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86756
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Nov 2009 23:40:49 +0000 (23:40 +0000)]
I did this a week or two ago
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86754
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 10 Nov 2009 23:20:04 +0000 (23:20 +0000)]
Ignore variable if scope info is not available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86753
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 10 Nov 2009 23:18:33 +0000 (23:18 +0000)]
Test this on Darwin only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86752
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Tue, 10 Nov 2009 23:16:41 +0000 (23:16 +0000)]
Emit correct code when making a ConstantPool entry for a vector
constant whose component type is not a legal type for the target.
(If the target ConstantPool cannot handle this type either, it has
an opportunity to merge elements. In practice any target with
8-bit bytes must support i8 *as data*).
7320806 (partial).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86751
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 10 Nov 2009 23:06:00 +0000 (23:06 +0000)]
Implement support to debug inlined functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86748
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Nov 2009 22:56:15 +0000 (22:56 +0000)]
in -dot-cfg and -dot-cfg-only, when rendering switch instructions,
put the switch value in the successor boxes like we put T/F for branches.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86747
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Nov 2009 22:39:16 +0000 (22:39 +0000)]
implement a TODO by teaching jump threading about "xor x, 1".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86739
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Nov 2009 22:26:15 +0000 (22:26 +0000)]
move some generally useful functions out of jump threading
into libanalysis and transformutils.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86735
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 10 Nov 2009 22:16:57 +0000 (22:16 +0000)]
Don't mark conditional branch instructions as control barriers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86732
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 10 Nov 2009 22:14:04 +0000 (22:14 +0000)]
Modify how the prologue encoded the "move" information for the FDE. GCC
generates a sequence similar to this:
__Z4funci:
LFB2:
mflr r0
LCFI0:
stmw r30,-8(r1)
LCFI1:
stw r0,8(r1)
LCFI2:
stwu r1,-80(r1)
LCFI3:
mr r30,r1
LCFI4:
where LCFI3 and LCFI4 are used by the FDE to indicate what the FP, LR, and other
things are. We generated something more like this:
Leh_func_begin1:
mflr r0
stw r31, 20(r1)
stw r0, 8(r1)
Llabel1:
stwu r1, -80(r1)
Llabel2:
mr r31, r1
Note that we are missing the "mr" instruction. This patch makes it more like the
GCC output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86729
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 10 Nov 2009 22:05:35 +0000 (22:05 +0000)]
Process InlinedAt location info.
Update InsertDeclare to return newly inserted llvm.dbg.declare intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86727
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Nov 2009 22:02:09 +0000 (22:02 +0000)]
fix a crash in SCCP handling extractvalue of an array, pointed out and
tracked down by Stephan Reiter!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86726
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 10 Nov 2009 22:01:05 +0000 (22:01 +0000)]
Teach PHIElimination to split critical edges when -split-phi-edges is enabled.
Critical edges leading to a PHI node are split when the PHI source variable is
live out from the predecessor block. This help the coalescer eliminate more
PHI joins.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86725
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 10 Nov 2009 22:00:56 +0000 (22:00 +0000)]
Refactoring: Extract method PHIElimination::isLiveOut().
Clean up some whitespace.
No functional changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86724
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Nov 2009 21:45:09 +0000 (21:45 +0000)]
improve comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86723
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Nov 2009 21:40:01 +0000 (21:40 +0000)]
Make jump threading eliminate blocks that just contain phi nodes,
debug intrinsics, and an unconditional branch when possible. This
reuses the TryToSimplifyUncondBranchFromEmptyBlock function split
out of simplifycfg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86722
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 10 Nov 2009 21:14:05 +0000 (21:14 +0000)]
Generalize lsr code that optimize loop to count down towards zero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86715
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 10 Nov 2009 21:02:18 +0000 (21:02 +0000)]
Optimize test more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86714
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Hernandez [Tue, 10 Nov 2009 19:53:28 +0000 (19:53 +0000)]
make this handle redefinition of malloc function with different prototype correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86712
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 10 Nov 2009 19:48:13 +0000 (19:48 +0000)]
Change Thumb1 address mode printing, instead of
[r0, #2 * 4]
Now
[r0, #8]
This makes Thumb2 assembly more uniform and frankly the scale doesn't add much.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86707
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 10 Nov 2009 19:44:56 +0000 (19:44 +0000)]
Add a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86706
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 10 Nov 2009 19:36:40 +0000 (19:36 +0000)]
Add defensive break.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86705
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 10 Nov 2009 18:24:37 +0000 (18:24 +0000)]
Add a monstrous hack to improve X86ISelDAGToDAG compile time.
- Force NDEBUG on in any Release build. This drops the compile time to ~100s
from ~600s, in Release mode.
- This may just be a temporary workaround, I don't know the true nature of the
gcc-4.2 compile time performance problem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86695
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 10 Nov 2009 18:21:37 +0000 (18:21 +0000)]
Fix obvious typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86694
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Nov 2009 17:00:47 +0000 (17:00 +0000)]
clarify logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86689
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 10 Nov 2009 15:30:33 +0000 (15:30 +0000)]
CMake: Add Darwin-specific linker flags for building loadable modules
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86684
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 10 Nov 2009 13:49:50 +0000 (13:49 +0000)]
Teach DSE to eliminate useless trampolines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86683
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 10 Nov 2009 09:32:10 +0000 (09:32 +0000)]
Add brackets to make gcc-4.4 happy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86681
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 10 Nov 2009 09:08:09 +0000 (09:08 +0000)]
Codegen support for the llvm.invariant/lifetime.start/end intrinsics:
just throw them away.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86678
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Hernandez [Tue, 10 Nov 2009 08:32:25 +0000 (08:32 +0000)]
Update computeArraySize() to use ComputeMultiple() to determine the array size associated with a malloc; also extend PerformHeapAllocSRoA() to check if the optimized malloc's arg had its highest bit set, so that it is safe for ComputeMultiple() to look through sext instructions while determining the optimized malloc's array size
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86676
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Hernandez [Tue, 10 Nov 2009 08:28:35 +0000 (08:28 +0000)]
Add ComputeMultiple() analysis function that recursively determines if a Value V is a multiple of unsigned Base
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86675
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Nov 2009 07:44:36 +0000 (07:44 +0000)]
optimize test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86672
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Nov 2009 07:23:37 +0000 (07:23 +0000)]
unify the code that determines whether it is a good idea to change the type
of a computation. This fixes some infinite loops when dealing with TD that
has no native types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86670
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 10 Nov 2009 07:00:43 +0000 (07:00 +0000)]
Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86668
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 10 Nov 2009 06:46:40 +0000 (06:46 +0000)]
Reapply r86359, "Teach dead store elimination that certain intrinsics write to
memory just like a store" with bug fixed (partial-overwrite.ll is the
regression test).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86667
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Nov 2009 05:59:26 +0000 (05:59 +0000)]
refactor TryToSimplifyUncondBranchFromEmptyBlock out of SimplifyCFG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86666
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Tue, 10 Nov 2009 02:45:37 +0000 (02:45 +0000)]
CMake: Support for building llvm loadable modules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86656
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 10 Nov 2009 02:41:27 +0000 (02:41 +0000)]
lit: Start documentation testing architecture.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86655
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 10 Nov 2009 02:41:17 +0000 (02:41 +0000)]
lit: Add ExampleTests, for testing lit and demonstrating test suite features.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86654
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 10 Nov 2009 02:40:21 +0000 (02:40 +0000)]
lit: Fix bug in --show-suites which accidentally override the list of tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86653
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Tue, 10 Nov 2009 02:35:13 +0000 (02:35 +0000)]
Fix PR5445
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86651
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Nov 2009 02:04:54 +0000 (02:04 +0000)]
I misread the parens, not so redundant after all.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86648
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Nov 2009 01:57:31 +0000 (01:57 +0000)]
make jump threading recursively simplify expressions instead of doing it
just one level deep. On the testcase we go from getting this:
F1: ; preds = %T2
%F = and i1 true, %cond ; <i1> [#uses=1]
br i1 %F, label %X, label %Y
to a fully threaded:
F1: ; preds = %T2
br label %Y
This changes gets us to the point where we're forming (too many) switch
instructions on doug's strswitch testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86646
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Nov 2009 01:56:04 +0000 (01:56 +0000)]
remove some redundant parens.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86645
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Tue, 10 Nov 2009 01:45:05 +0000 (01:45 +0000)]
CMake: Remove unnecessary `unset' which was not supported by old cmake
releases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86644
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 10 Nov 2009 01:37:57 +0000 (01:37 +0000)]
Remove an unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86642
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 10 Nov 2009 01:36:20 +0000 (01:36 +0000)]
Minor code simplification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86641
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 10 Nov 2009 01:33:08 +0000 (01:33 +0000)]
Trim a bunch of unneeded code from this testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86640
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Nov 2009 01:19:06 +0000 (01:19 +0000)]
don't invalidate PN, rewrite of this code is in progress anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86639
91177308-0d34-0410-b5e6-
96231b3b80d8