Chris Lattner
422a3ff7d5
add an assert to make it really clear what this is doing. Return singularval as
...
a compile time perf optimization to avoid a load.
llvm-svn: 90507
2009-12-04 01:03:32 +00:00
Jakob Stoklund Olesen
7c5af26d12
Also attempt trivial coalescing for live intervals that end in a copy.
...
The coalescer is supposed to clean these up, but when setting up parameters
for a function call, there may be copies to physregs. If the defining
instruction has been LICM'ed far away, the coalescer won't touch it.
The register allocation hint does not always work - when the register
allocator is backtracking, it clears the hints.
This patch takes care of a few more cases that r90163 missed.
llvm-svn: 90502
2009-12-04 00:16:04 +00:00
Evan Cheng
0f151e89ab
- If the reaching definition is an undef and the use is a PHI, add the implicit_def to the end of the source block.
...
- When reaching value is replaced with another, update the cache as well.
llvm-svn: 90501
2009-12-04 00:09:05 +00:00
Devang Patel
2e60d7e71f
Insert composite type DIE into the map before processing type fields. This allows fields to find their context DIE from the map.
...
llvm-svn: 90498
2009-12-03 23:46:57 +00:00
Victor Hernandez
e2129e2966
Add ParseInlineMetadata() which can parses metadata that refers to an instruction. Extend ParseParameterList() to use this new function so that calls to llvm.dbg.declare can pass inline metadata
...
llvm-svn: 90497
2009-12-03 23:40:58 +00:00
Jim Grosbach
891c545129
remove out of date FIXME.
...
llvm-svn: 90490
2009-12-03 21:55:01 +00:00
Evan Cheng
73dcaa14fa
Handle undef values properly.
...
llvm-svn: 90489
2009-12-03 21:51:55 +00:00
Evan Cheng
d350df127e
Watch out for PHI instruction with no source operands.
...
llvm-svn: 90488
2009-12-03 21:50:58 +00:00
Bob Wilson
c717c5e7ae
Fix a comment typo.
...
llvm-svn: 90487
2009-12-03 21:47:07 +00:00
Duncan Sands
606510ae1b
Fix ExpandShiftWithUnknownAmountBit, which was completely bogus.
...
Pointed out by Javier Martinez (who also provided a patch). Since
this logic is not used on (for example) x86, I guess nobody noticed.
Tested by generating SHL, SRL, SRA on various choices of i64 for all
possible shift amounts, and comparing with gcc. Since I did this on
x86-32, I had to force the use of ExpandShiftWithUnknownAmountBit.
What I'm saying here is that I don't have a testcase I can add to the
repository.
llvm-svn: 90482
2009-12-03 21:37:32 +00:00
Jakob Stoklund Olesen
a78cbb2848
Clean up some loop logic.
...
llvm-svn: 90481
2009-12-03 20:49:10 +00:00
Devang Patel
fe7cf074f0
Add support to emit debug info for virtual functions and virtual base classes.
...
llvm-svn: 90474
2009-12-03 19:11:07 +00:00
Dan Gohman
c33030883f
Print a newline after the Args: line so that unrelated errs() output doesn't
...
end up on the same line.
llvm-svn: 90473
2009-12-03 19:03:18 +00:00
Benjamin Kramer
ea59929634
Fix MSVC build.
...
llvm-svn: 90454
2009-12-03 13:23:03 +00:00
Andreas Neustifter
aed28d814f
Convert ProfileVerifier to template so it can be used for different types of ProfileInfo.
...
llvm-svn: 90451
2009-12-03 12:55:57 +00:00
Andreas Neustifter
75c913c200
Do not create negative edge weights in ProfileEstimator.
...
Use integer values for weights to prevent rounding errors.
Make ProfileEstimator more robust in general CFGs.
llvm-svn: 90449
2009-12-03 12:41:14 +00:00
Daniel Dunbar
63e2201f3e
Add an implementation of the delta debugging algorithm.
...
- This is a pretty slow / memory intensive implementation, and I will likely
change it to an iterative model, but it works.
llvm-svn: 90447
2009-12-03 11:12:42 +00:00
Andreas Neustifter
39cc7661ad
Use ProfileInfo-API in ProfileInfo Loader and do more assertions.
...
llvm-svn: 90446
2009-12-03 11:00:37 +00:00
Andreas Neustifter
83d47e4f5f
Converted ProfileInfo to template, added more API for ProfileInfo-preserving.
...
llvm-svn: 90445
2009-12-03 09:30:12 +00:00
Evan Cheng
d4f8c9fee2
Teach tail duplication to update SSA form. Work in progress.
...
llvm-svn: 90432
2009-12-03 08:43:53 +00:00
Chris Lattner
b46655e25c
expand note.
...
llvm-svn: 90429
2009-12-03 07:43:46 +00:00
Chris Lattner
6b86618a2b
add a note
...
llvm-svn: 90428
2009-12-03 07:41:54 +00:00
Nate Begeman
3a9c51f256
Don't pull vector sext through both hands of a logical operation, since doing so prevents the fusion of vector sext and setcc into vsetcc.
...
Add a testcase for the above transformation.
Fix a bogus use of APInt noticed while tracking this down.
llvm-svn: 90423
2009-12-03 07:11:29 +00:00
Chris Lattner
b3cc713378
fix a build problem with VC++, PR5664, patch by Alp Toker!
...
llvm-svn: 90419
2009-12-03 06:58:32 +00:00
Bob Wilson
b53c801366
Recognize canonical forms of vector shuffles where the same vector is used for
...
both source operands. In the canonical form, the 2nd operand is changed to an
undef and the shuffle mask is adjusted to only reference elements from the 1st
operand. Radar 7434842.
llvm-svn: 90417
2009-12-03 06:40:55 +00:00
Jakob Stoklund Olesen
c4ee94503f
Don't call getValueType() on a null SDValue
...
llvm-svn: 90415
2009-12-03 05:15:35 +00:00
Owen Anderson
251cb28a25
Fix this crasher, and add a FIXME for a missed optimization.
...
llvm-svn: 90408
2009-12-03 03:43:29 +00:00
Evan Cheng
1c3edb4fa8
Fill out codegen SSA updater. It's not yet tested.
...
llvm-svn: 90395
2009-12-03 02:31:43 +00:00
Bill Wendling
4dbdfa814e
Revert r90371. It was causing build failures.
...
llvm-svn: 90383
2009-12-03 01:54:07 +00:00
Jakob Stoklund Olesen
6772f75d4d
Don't hang on to pointers or references after vector::push_back.
...
The MO reference to a MachineOperand can be invalidated by
MachineInstr::addOperand. Don't even use it for debugging.
llvm-svn: 90381
2009-12-03 01:49:56 +00:00
Chris Lattner
3bf9321d67
add a failing testcase.
...
llvm-svn: 90380
2009-12-03 01:46:18 +00:00
Devang Patel
45a72a7032
Emit method definition DIE at module level (even for methods with inlined functino body at soure level) so that the debugger can invoke it. This fixes many test failures in gdb test suite.
...
llvm-svn: 90375
2009-12-03 01:25:38 +00:00
Bill Wendling
b01be4b16d
Further improvements: refactoring code that does the same thing into one
...
function, converting "dyn_cast" to "cast", asserting the correct things, and
other general cleanups.
llvm-svn: 90371
2009-12-03 01:15:46 +00:00
Chris Lattner
29e2e60be6
yay for case insensitive file systems (?)
...
llvm-svn: 90370
2009-12-03 01:10:05 +00:00
Chris Lattner
851aea6ce2
fix PR5673 by being more careful about pointers to functions.
...
llvm-svn: 90369
2009-12-03 01:05:45 +00:00
Chris Lattner
09df97d257
remove some dead std::ostream using code.
...
llvm-svn: 90366
2009-12-03 00:55:04 +00:00
Chris Lattner
9ce833945e
improve portability to avoid conflicting with std::next in c++'0x.
...
Patch by Howard Hinnant!
llvm-svn: 90365
2009-12-03 00:50:42 +00:00
Bill Wendling
db54e8c67c
This initial code is meant to convert TargetData to use an AbstractTypesUser so
...
that it doesn't have dangling pointers when abstract types are resolved. This
modifies it somewhat to address comments: making the "StructLayoutMap" an
anonymous structure, calling "removeAbstractTypeUser" when appropriate, and
adding asserts where helpful.
llvm-svn: 90362
2009-12-03 00:17:12 +00:00
Douglas Gregor
7416e5586f
Fix CMake makefiles
...
llvm-svn: 90354
2009-12-02 22:19:31 +00:00
Evan Cheng
e573096db2
Skeleton for MachineInstr level SSA updater.
...
llvm-svn: 90353
2009-12-02 22:02:52 +00:00
Bill Wendling
0eb481a249
Remove unnecessary check.
...
llvm-svn: 90352
2009-12-02 22:02:20 +00:00
Jim Grosbach
230025f501
Add MaxStackAlignment.cpp to CMake
...
llvm-svn: 90337
2009-12-02 19:31:07 +00:00
Jim Grosbach
0e1230b23b
Factor the stack alignment calculations out into a target independent pass.
...
No functionality change.
llvm-svn: 90336
2009-12-02 19:30:24 +00:00
Bob Wilson
adb1889175
Don't count PHI instructions toward the limit for tail duplicating a block.
...
llvm-svn: 90326
2009-12-02 17:15:24 +00:00
Jim Grosbach
ccb304105a
Move EliminateDuplicatePHINodes() from SimplifyCFG.cpp to Local.cpp
...
llvm-svn: 90324
2009-12-02 17:06:45 +00:00
Andreas Neustifter
e70972f8d5
Cheap, mostly strict, stable sorting.
...
This is necessary for tests so the results are comparable.
llvm-svn: 90320
2009-12-02 15:57:15 +00:00
Benjamin Kramer
65c962b3aa
Silence compiler warnings.
...
llvm-svn: 90319
2009-12-02 15:33:44 +00:00
Devang Patel
6f4a280987
Clarify that DIEString does not keep a copy of the string.
...
llvm-svn: 90318
2009-12-02 15:25:16 +00:00
Owen Anderson
f47cde694f
Cleanup/remove some parts of the lifetime region handling code in memdep and GVN,
...
per Chris' comments. Adjust testcases to match.
llvm-svn: 90304
2009-12-02 07:35:19 +00:00
Chris Lattner
b541c63e60
factor some code better.
...
llvm-svn: 90299
2009-12-02 06:44:58 +00:00