Eli Friedman
19c5c57885
Simplify/generalize the xor+add->sign-extend instcombine.
...
llvm-svn: 94943
2010-01-31 04:29:12 +00:00
Eli Friedman
58c7936637
Add a small transform: transform -(X<<Y) to (-X<<Y) when the shift has a single
...
use and X is free to negate.
llvm-svn: 94941
2010-01-31 02:30:23 +00:00
Sean Callanan
5458663492
Moved InstallLexer() from the X86-specific AsmLexer
...
to the TargetAsmLexer class so that clients can
actually use the TargetAsmLexer they get from a
Target.
llvm-svn: 94940
2010-01-31 02:28:18 +00:00
Evan Cheng
c2f3c20680
Do not mark no-return calls tail calls. It'll screw up special calls like longjmp and it doesn't make much sense for performance reason. If my logic is faulty, please let me know.
...
llvm-svn: 94937
2010-01-31 00:59:31 +00:00
Bruno Cardoso Lopes
dcd6d1450f
Fix PR6144. Reload GP before the emission of CALLSEQ_END to guarantee the right reload order
...
llvm-svn: 94915
2010-01-30 18:32:07 +00:00
Bruno Cardoso Lopes
a82b8ade4d
Fix mov.d out register by using the FFR register class directly
...
llvm-svn: 94914
2010-01-30 18:29:19 +00:00
Anton Korobeynikov
f7651ec593
Fix a gross typo: ARMv6+ may or may not support unaligned memory operations.
...
Even if they are suported by the core, they can be disabled
(this is just a configuration bit inside some register).
Allow unaligned memops on darwin and conservatively disallow them otherwise.
llvm-svn: 94889
2010-01-30 14:08:12 +00:00
Bob Wilson
0f04082970
Check alignment of loads when deciding whether it is safe to execute them
...
unconditionally. Besides checking the offset, also check that the underlying
object is aligned as much as the load itself.
llvm-svn: 94875
2010-01-30 04:42:39 +00:00
Evan Cheng
40ae22e14d
Allow more tailcall optimization: calls with inputs that are all passed in registers.
...
llvm-svn: 94873
2010-01-30 01:22:00 +00:00
Evan Cheng
5acba193ef
Don't forget to transfer target flag when inserting a tailcall instruction.
...
llvm-svn: 94872
2010-01-30 01:16:15 +00:00
Devang Patel
70713c75da
Emit declaration DIE for the class static variables.
...
llvm-svn: 94870
2010-01-30 01:08:30 +00:00
Daniel Dunbar
23e8bc782c
MC/X86 AsmParser: Handle absolute memory operands correctly. We were doing
...
something totally broken and parsing them as immediates, but the .td file also
had the wrong match class so things sortof worked. Except, that is, that we
would parse
movl $0, %eax
as
movl 0, %eax
Feel free to guess how well that worked.
llvm-svn: 94869
2010-01-30 01:02:48 +00:00
Daniel Dunbar
0016281dc2
AsmMatcher: Create operand classes before use, apparently records aren't visited
...
in the order they were declared.
llvm-svn: 94868
2010-01-30 01:02:37 +00:00
Dale Johannesen
9774a29dc0
Fix a case where debug_value could affect codegen.
...
llvm-svn: 94866
2010-01-30 00:57:47 +00:00
Bob Wilson
e979c978e0
Use more specific types to avoid casts. No functionality change.
...
llvm-svn: 94863
2010-01-30 00:41:10 +00:00
Bob Wilson
ccd1585ba8
Remove ARM-specific calling convention from this test. Target data is
...
needed for this test, but otherwise, there's nothing ARM-specific about
it and no need to specify the calling convention.
llvm-svn: 94862
2010-01-30 00:40:23 +00:00
Daniel Dunbar
ee85d3388b
X86.td: Refactor to bring operands that use print_pcrel_imm together.
...
llvm-svn: 94861
2010-01-30 00:24:12 +00:00
Daniel Dunbar
08265d2e9b
FileCheck: When looking for "possible matches", only compare against the prefix
...
line. Turns out edit_distance can be slow if the string we are scanning for
happens to be quite large.
llvm-svn: 94860
2010-01-30 00:24:06 +00:00
Daniel Dunbar
e92f9cffdb
AsmMatcher/X86: Separate out sublass for memory operands that have no segment
...
register, and use to cleanup a FIXME in X86AsmParser.cpp.
llvm-svn: 94859
2010-01-30 00:24:00 +00:00
Jakob Stoklund Olesen
e3fd8b5848
Keep iterating over all uses when meeting a phi node in AllUsesOfValueWillTrapIfNull().
...
This bug was exposed by my inliner cost changes in r94615, and caused failures
of lencod on most architectures when building with LTO.
This patch fixes lencod and 464.h264ref on x86-64 (and likely others).
llvm-svn: 94858
2010-01-29 23:54:14 +00:00
Daniel Dunbar
b0a870919b
MC/X86: Add a nice X86 assembler matcher test case from Kevin Enderby.
...
- This test case is auto generated, and has been verified to round-trip
correctly through llvm-mc by checking the assembled .o file before and after
piping through llvm-mc. It will be extended over time as the matcher grows
support for more instructions.
llvm-svn: 94857
2010-01-29 23:32:40 +00:00
Johnny Chen
377da9a33c
Modified encoding bits specification for VFP instructions. In particular, the D
...
bit (Inst{22}) and the M bit (Inst{5}) should be left unspecified. For binary
format instructions, Inst{6} and Inst{4} need to specified for proper decodings.
llvm-svn: 94855
2010-01-29 23:21:10 +00:00
Dan Gohman
c5a2b73589
Print a comment next to "materializable" global values, to distinguish
...
them from values that are not actually defined in the module.
llvm-svn: 94854
2010-01-29 23:12:36 +00:00
Evan Cheng
5964860340
PPC is not ready for sibcall optimization.
...
llvm-svn: 94853
2010-01-29 23:05:56 +00:00
Bob Wilson
71bc5f0787
Preserve load alignment in instcombine transformations. I've been unable to
...
create a testcase where this matters. The select+load transformation only
occurs when isSafeToLoadUnconditionally is true, and in those situations,
instcombine also changes the underlying objects to be aligned. This seems
like a good idea regardless, and I've verified that it doesn't pessimize
the subsequent realignment.
llvm-svn: 94850
2010-01-29 22:39:21 +00:00
Dan Gohman
4ce1281b20
Minor code cleanup.
...
llvm-svn: 94848
2010-01-29 21:57:46 +00:00
Dan Gohman
b550d3a78e
Skip whitespace when looking for a potential intended match.
...
Before:
<stdin>:94:1: note: possible intended match here
movsd 4096(%rsi), %xmm0
^
After:
<stdin>:94:2: note: possible intended match here
movsd 4096(%rsi), %xmm0
^
llvm-svn: 94847
2010-01-29 21:55:16 +00:00
Dan Gohman
ef102f1ed3
Fix the position of the caret in the FileCheck error message.
...
Before:
test/CodeGen/X86/lsr-reuse.ll:52:34: error: expected string not found in input
; CHECK: movsd -2048(%rsi), %xmm0
^
After:
test/CodeGen/X86/lsr-reuse.ll:52:10: error: expected string not found in input
; CHECK: movsd -2048(%rsi), %xmm0
^
llvm-svn: 94846
2010-01-29 21:53:18 +00:00
Junjie Gu
4d7286efef
Make sure the size is doubled (not 4x).
...
llvm-svn: 94845
2010-01-29 21:34:26 +00:00
Sean Callanan
a6a8be8712
Removed symbols from .exports that are not yet in
...
the library.
llvm-svn: 94844
2010-01-29 21:21:44 +00:00
Dale Johannesen
9e9159cd4d
Add assertion to humor the paranoid.
...
llvm-svn: 94843
2010-01-29 21:21:28 +00:00
Victor Hernandez
8102f790ac
We were not writing bitcode for function-local metadata whose operands have been erased (making it not have any more function-local operands)
...
llvm-svn: 94842
2010-01-29 21:19:19 +00:00
Eric Christopher
47d90f7adb
Revert my last couple of patches. They appear to have broken bison.
...
llvm-svn: 94841
2010-01-29 21:16:24 +00:00
Jeffrey Yasskin
6838a27b47
Rename two IRReader.h functions to indicate that they return a Module
...
that loads its contents lazily from bitcode. I think these are the
only remaining mis-named functions.
llvm-svn: 94840
2010-01-29 21:11:04 +00:00
Bob Wilson
bb651db10d
Use uint64_t instead of unsigned for offsets and sizes.
...
llvm-svn: 94835
2010-01-29 20:34:28 +00:00
Bob Wilson
f897b7b37e
Improve isSafeToLoadUnconditionally to recognize that GEPs with constant
...
indices are safe if the result is known to be within the bounds of the
underlying object.
llvm-svn: 94829
2010-01-29 19:19:08 +00:00
Jeffrey Yasskin
394da72ecc
Belatedly document r85295 and r85330.
...
llvm-svn: 94825
2010-01-29 19:10:38 +00:00
Devang Patel
022d4a7fc0
Add size and location info in DW_TAG_class_type descriptor.
...
llvm-svn: 94822
2010-01-29 18:34:58 +00:00
Devang Patel
c91ba40a59
Before inserting llvm.dbg.declare intrinsic at the end of a basic block, check whether the basic block has a terminator or not.
...
This API is used by clang and the test case is test/CodeGen/debug-info-crash.c in clang module.
llvm-svn: 94820
2010-01-29 18:30:57 +00:00
Benjamin Kramer
fbfb029ab0
Fix MSVC build.
...
llvm-svn: 94809
2010-01-29 15:19:06 +00:00
Benjamin Kramer
cae092b08b
Convert some users of ftostr to raw_ostream.
...
llvm-svn: 94808
2010-01-29 14:42:22 +00:00
Benjamin Kramer
326bcaa5f9
Use llvm::format instead of ftostr (which just calls sprintf).
...
llvm-svn: 94807
2010-01-29 14:40:33 +00:00
Duncan Sands
6b277c2823
Change the SREM case to match the logic in the IR version ComputeMaskedBits.
...
llvm-svn: 94805
2010-01-29 09:45:26 +00:00
Evan Cheng
2cbd1b19db
Catch more trivial tail call opportunities: no inputs and output types match.
...
llvm-svn: 94804
2010-01-29 06:45:59 +00:00
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