Duncan Sands
d6baca9159
Having RHSKnownZero and RHSKnownOne be alternative names for KnownZero and KnownOne
...
(via APInt &RHSKnownZero = KnownZero, etc) seems dangerous and confusing to me: it
is easy not to notice this, and then wonder why KnownZero/RHSKnownZero changed
underneath you when you modified RHSKnownZero/KnownZero etc. So get rid of this.
No intended functionality change (tested with "make check" + llvm-gcc bootstrap).
llvm-svn: 94802
2010-01-29 06:18:46 +00:00
Duncan Sands
6f0edf859c
It looks like the changes to the SRem logic of SimplifyDemandedUseBits
...
(fix for PR6165) are needed here too.
llvm-svn: 94801
2010-01-29 06:18:37 +00:00
Daniel Dunbar
f65b05e7e1
FileCheck: Switch "possible match" calculation to use StringRef::edit_distance.
...
- Thanks Doug, who is obviously less lazy than me!
llvm-svn: 94795
2010-01-29 03:22:19 +00:00
Eric Christopher
f01379e6c2
Make strcpy_chk lower to strcpy if we have a safe size.
...
llvm-svn: 94783
2010-01-29 01:37:11 +00:00
Sean Callanan
2112298100
Quick fix to make the header file for the enhanced
...
disassembly information have a better comment (and
better guard macros).
llvm-svn: 94781
2010-01-29 01:34:29 +00:00
Sean Callanan
5d23b70461
Added a bare-bones Makefile to build the enhanced disassembly
...
library as a static and a shared library. Added dependencies
so the target-specific enhanced disassembly info tables are
built before the library.
llvm-svn: 94780
2010-01-29 01:30:01 +00:00
Ted Kremenek
1eca6e4925
Recognize 'add_executable' when analyzing CMake files.
...
llvm-svn: 94777
2010-01-29 01:10:55 +00:00
Ted Kremenek
cce1825bc9
Update CMake build.
...
llvm-svn: 94776
2010-01-29 01:10:25 +00:00
Eric Christopher
7d74af1824
Add constant support to object size handling and remove default
...
lowering. We'll either figure it out, or not and be lowered by
SelectionDAGBuild.
Add test.
llvm-svn: 94775
2010-01-29 01:09:57 +00:00
Bill Wendling
f6736d2bae
Generic reformatting and comment fixing. No functionality change.
...
llvm-svn: 94771
2010-01-29 00:52:43 +00:00
Bill Wendling
d115615285
Add newline to debugging output, and fix some grammar-os in comment.
...
llvm-svn: 94765
2010-01-29 00:27:39 +00:00
Sean Callanan
59ba2433b0
Added a custom TableGen backend to support the
...
enhanced disassembler, and the necessary makefile
rules to build the table for X86.
llvm-svn: 94764
2010-01-29 00:21:04 +00:00
Victor Hernandez
60060d030c
mem2reg erases the dbg.declare intrinsics that it converts to dbg.val intrinsics
...
llvm-svn: 94763
2010-01-29 00:01:35 +00:00
Bill Wendling
d408e7be4e
Assign the ordering of SDNodes in a much less intrusive fashion. After the
...
"visit*" method is called, take the newly created nodes, walk them in a DFS
fashion, and if they don't have an ordering set, then give it one.
llvm-svn: 94757
2010-01-28 21:51:40 +00:00
Mikhail Glushenkov
94b2e3f219
Support some more options...
...
llvm-svn: 94752
2010-01-28 18:19:36 +00:00
Dan Gohman
0dc9176f36
Remove the folding rule
...
getelementptr (i8* inttoptr (i64 1 to i8*), i32 -1)
to
inttoptr (i64 0 to i8*)
from the VMCore constant folder. It didn't handle sign-extension properly
in the case where the source integer is smaller than a pointer size. And,
it relied on an assumption about sizeof(i8).
The Analysis constant folder still folds these kinds of things; it has
access to TargetData, so it can do them right.
Add a testcase which tests that the VMCore constant folder doesn't
miscompile this, and that the Analysis folder does fold it.
llvm-svn: 94750
2010-01-28 18:08:26 +00:00
Benjamin Kramer
3b01285b76
Replace strcpy with memcpy when we have the length around anyway.
...
llvm-svn: 94746
2010-01-28 18:04:38 +00:00
Duncan Sands
a3395c61b5
Fix PR6165. The bug was that LHSKnownZero was being and'd with DemandedMask
...
when it should have been and'd with LowBits. Fix that and while there beef
up the logic in the case of a negative LHS.
llvm-svn: 94745
2010-01-28 17:22:42 +00:00
Douglas Gregor
1fcfb8e183
Add llvm::Program::ChangeStderrToBinary().
...
llvm-svn: 94743
2010-01-28 06:42:08 +00:00
Dan Gohman
25100f3a4e
Check Type::isSized before calling ScalarEvolution::getAllocSizeExpr,
...
rather than after.
llvm-svn: 94742
2010-01-28 06:32:46 +00:00
Chris Lattner
d7a8482810
convert the last 3 targets to use EmitFunctionBody() now that
...
it has before/end body hooks.
lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp | 49 ++-----------
lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp | 87 ++++++------------------
lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp | 56 +++------------
test/CodeGen/XCore/ashr.ll | 2
4 files changed, 48 insertions(+), 146 deletions(-)
llvm-svn: 94741
2010-01-28 06:22:43 +00:00
Dan Gohman
4319402eb0
Make getAlignOf return an i64, for consistency with getSizeOf and
...
getOffsetOf, and remove the comment about assuming i8 is byte-aligned,
which is no longer applicable.
llvm-svn: 94738
2010-01-28 02:43:22 +00:00
Dan Gohman
1eb6920a2f
Remove SCEVAllocSizeExpr and SCEVFieldOffsetExpr, and in their place
...
use plain SCEVUnknowns with ConstantExpr::getSizeOf and
ConstantExpr::getOffsetOf constants. This eliminates a bunch of
special-case code.
Also add code for pattern-matching these expressions, for clients that
want to recognize them.
Move ScalarEvolution's logic for expanding array and vector sizeof
expressions into an element count times the element size, to expose
the multiplication to subsequent folding, into the regular constant
folder.
llvm-svn: 94737
2010-01-28 02:15:55 +00:00
Chris Lattner
641dab84e4
add target hooks for emitting random gunk before and after the function body.
...
llvm-svn: 94732
2010-01-28 01:58:58 +00:00
Evan Cheng
7e26fdaa78
Fix a bug introduced by r94490 where it created a X86ISD::CMP whose output type is different from its inputs.
...
This fixes PR6146.
llvm-svn: 94731
2010-01-28 01:57:22 +00:00
Chris Lattner
5051cd2c50
switch blackfin to the default runOnMachineFunction
...
llvm-svn: 94729
2010-01-28 01:54:33 +00:00
Chris Lattner
3bc2ff4750
eliminate a now-useless class.
...
llvm-svn: 94728
2010-01-28 01:50:22 +00:00
Chris Lattner
138a5f1d72
Switch MSP430, SPU, Sparc, and SystemZ to use EmitFunctionBody().
...
Diffstat:
6 files changed, 30 insertions(+), 284 deletions(-)
llvm-svn: 94727
2010-01-28 01:48:52 +00:00
Jim Grosbach
7474937004
Update of 94055 to track the IR level call site information via an intrinsic.
...
This allows code gen and the exception table writer to cooperate to make sure
landing pads are associated with the correct invoke locations.
llvm-svn: 94726
2010-01-28 01:45:32 +00:00
Jeffrey Yasskin
fb794eb907
Record the death of ModuleProvier and GhostLinkage in the release notes and
...
give upgrade instructions.
llvm-svn: 94723
2010-01-28 01:41:20 +00:00
Chris Lattner
95118672e3
Give AsmPrinter the most common expected implementation of
...
runOnMachineFunction, and switch PPC to use EmitFunctionBody.
The two ppc asmprinters now don't heave to define
runOnMachineFunction.
llvm-svn: 94722
2010-01-28 01:28:58 +00:00
Jeffrey Yasskin
b587f073e5
Truncate the release notes so they're ready to accumulate notes for the 2.7 release.
...
llvm-svn: 94720
2010-01-28 01:14:43 +00:00
Chris Lattner
68736fc18c
switch ARM to EmitFunctionBody().
...
llvm-svn: 94719
2010-01-28 01:10:34 +00:00
Chris Lattner
df1662f0e6
emit a 0 byte instead of a noop if a function is empty on darwin.
...
"0" is nice and target independent.
llvm-svn: 94718
2010-01-28 01:06:32 +00:00
Chris Lattner
8411a9084e
Remove the argument from EmitJumpTableInfo, because it doesn't need it.
...
Move the X86 implementation of function body emission up to
AsmPrinter::EmitFunctionBody, which works by calling the virtual
EmitInstruction method.
llvm-svn: 94716
2010-01-28 01:02:27 +00:00
Chris Lattner
6a127932c1
Drop the argument to AsmPrinter::EmitConstantPool and make it virtual.
...
Overload it in the ARM backend to do nothing, since is does insane
constant pool emission.
llvm-svn: 94708
2010-01-28 00:19:24 +00:00
Chris Lattner
13333b7560
don't emit constant pools twice.
...
llvm-svn: 94706
2010-01-28 00:15:18 +00:00
Chris Lattner
de4b09beb9
rename printVisibility to EmitVisibility and make it private,
...
constify EmitLinkage.
llvm-svn: 94705
2010-01-28 00:05:10 +00:00
Chris Lattner
7e98bbe5a3
switch ARM to use EmitFunctionHeader.
...
llvm-svn: 94703
2010-01-27 23:58:11 +00:00
Chris Lattner
21062f0348
eliminate the ARMFunctionInfo::Align member, using
...
MachineFunction::Alignment instead.
llvm-svn: 94701
2010-01-27 23:37:36 +00:00
Chris Lattner
fad5ea4f89
add a helper function for bumping up the alignment of a machine function.
...
llvm-svn: 94700
2010-01-27 23:35:43 +00:00
Chris Lattner
73288be43c
switch blackfin to use EmitFunctionHeader. BlackfinAsmPrinter.cpp
...
is now less than 200 LOC!
llvm-svn: 94699
2010-01-27 23:26:37 +00:00
Chris Lattner
e21bc14932
switch mips to use the shared EmitFunctionHeader() function
...
llvm-svn: 94698
2010-01-27 23:23:58 +00:00
Sean Callanan
d9a2a982fc
Changed constants to an enum so as not to pollute the
...
global namespace needlessly.
llvm-svn: 94697
2010-01-27 23:20:51 +00:00
Sean Callanan
4325701296
Added a header file defining the externally-visible C API
...
for the LLVM disassemblers.
llvm-svn: 94696
2010-01-27 23:03:46 +00:00
Dale Johannesen
74ab14a99f
If the only use of something is a DEBUG_VALUE, don't
...
let that stop it from being deleted, and change the
DEBUG_VALUE value to undef.
llvm-svn: 94694
2010-01-27 22:12:36 +00:00
Dale Johannesen
4b9e510f8f
Treat MO_REG 0 location as undefined in DEBUG_VALUE,
...
per document.
llvm-svn: 94693
2010-01-27 22:11:16 +00:00
Victor Hernandez
8bef667691
Need to recurse for all operands of function-local metadata; and handle Instructions (which map to themselves)
...
llvm-svn: 94691
2010-01-27 22:03:03 +00:00
Bob Wilson
2e1a609654
Avoid creating redundant PHIs in SSAUpdater::GetValueInMiddleOfBlock.
...
This was already being done in SSAUpdater::GetValueAtEndOfBlock so I've
just changed SSAUpdater to check for existing PHIs in both places.
llvm-svn: 94690
2010-01-27 22:01:02 +00:00
Ted Kremenek
7c93f74ed0
Update CMake build.
...
llvm-svn: 94687
2010-01-27 20:44:12 +00:00