Commit Graph

11152 Commits

Author SHA1 Message Date
Jason W Kim ef3ba55e52 Cut unneeded global variable.
llvm-svn: 116953
2010-10-20 22:01:39 +00:00
Rafael Espindola 89f6613e76 Handle _GLOBAL_OFFSET_TABLE_ correctly.
llvm-svn: 116932
2010-10-20 16:46:08 +00:00
Dale Johannesen 710a2d9d46 Enable using vdup for vector constants which are splat of
integers by default, and remove the controlling flag, now
that LICM will hoist such vdup's.  8003375.

llvm-svn: 116852
2010-10-19 20:00:17 +00:00
Evan Cheng 63c7608c34 Re-enable register pressure aware machine licm with fixes. Hoist() may have
erased the instruction during LICM so UpdateRegPressureAfter() should not
reference it afterwards.

llvm-svn: 116845
2010-10-19 18:58:51 +00:00
Jason W Kim e8b3711ae9 Fixing r116753 r116756 r116777
The failures in r116753 r116756 were caused by a python issue -
Python likes to append 'L' suffix to stringified numbers if the number
is larger than a machine int. Unfortunately, this causes a divergence of
behavior between 32 and 64 bit python versions.

I re-crafted elf-dump/common_dump to take care of these issues by:

1. always printing 0x (makes for easy sed/regex)
2. always print fixed length (exactly 2 + numBits/4 digits long)
   by mod ((2^numBits) - 1)
3. left-padded with '0'

There is a residual common routine that is also used by
macho-dump (dataToHex) , so I left the 'section_data' test values alone.

llvm-svn: 116823
2010-10-19 17:39:10 +00:00
Daniel Dunbar 418204e523 Revert r116781 "- Add a hook for target to determine whether an instruction def
is", which breaks some nightly tests.

llvm-svn: 116816
2010-10-19 17:14:24 +00:00
Mikhail Glushenkov 2072db24ed GlobalOpt: EvaluateFunction() must not evaluate stores to weak_odr globals.
Fixes PR8389.

llvm-svn: 116812
2010-10-19 16:47:23 +00:00
Che-Liang Chiou 18d3e435cb Add test case mov.ll for PTX device function
llvm-svn: 116806
2010-10-19 13:21:51 +00:00
Rafael Espindola e73bc89093 Fix PR8300 by remembering to keep the bitcast in all cases.
llvm-svn: 116788
2010-10-19 02:02:57 +00:00
Evan Cheng 8249dfe6ce - Add a hook for target to determine whether an instruction def is
"long latency" enough to hoist even if it may increase spilling. Reloading
  a value from spill slot is often cheaper than performing an expensive
  computation in the loop. For X86, that means machine LICM will hoist
  SQRT, DIV, etc. ARM will be somewhat aggressive with VFP and NEON
  instructions.
- Enable register pressure aware machine LICM by default.

llvm-svn: 116781
2010-10-19 00:55:07 +00:00
Eric Christopher eac5e381cc Speculatively revert 116753 and 116756 to attempt to fix the bots.
llvm-svn: 116777
2010-10-19 00:19:49 +00:00
Bob Wilson b6d61dc291 Support alignment for NEON vld-lane and vst-lane instructions.
llvm-svn: 116776
2010-10-19 00:16:32 +00:00
Kevin Enderby 49843c0162 Added a few tweaks to the Intel Descriptor-table support instructions to allow
word forms and suffixed versions to match the darwin assembler in 32-bit and
64-bit modes.  This is again for use just with assembly source for llvm-mc .

llvm-svn: 116773
2010-10-19 00:01:44 +00:00
Eric Christopher 7b92c2a9a0 Revert r116220 - thus turning arm fast isel back on by default.
llvm-svn: 116762
2010-10-18 22:53:53 +00:00
Jason W Kim d4cc3d420a Get rid of unneeded FormatOutput global variable
llvm-svn: 116756
2010-10-18 21:59:38 +00:00
Jason W Kim eae048885d Changed elf-dump to output hex format by default.
Also updated tests. 

llvm-svn: 116753
2010-10-18 21:32:41 +00:00
Dan Gohman 408beac597 Don't pass the raw invalid pointer used to represent conflicting
TBAA information to AliasAnalysis.

llvm-svn: 116751
2010-10-18 21:28:00 +00:00
Dan Gohman fe8abf88a0 Add a basic testcase for TBAA-aware LICM.
llvm-svn: 116745
2010-10-18 21:00:09 +00:00
Rafael Espindola fba9f74932 Implement R_386_GOT32.
llvm-svn: 116744
2010-10-18 20:47:21 +00:00
Rafael Espindola 0a5314fdb3 Relocate with .bss instead of using the symbol. Matches gas behavior.
llvm-svn: 116741
2010-10-18 20:25:33 +00:00
Dan Gohman f7a5e20372 Run tbaa before basicaa, since that's how it's expected to be used.
llvm-svn: 116731
2010-10-18 18:45:59 +00:00
Rafael Espindola e3dc9e2ea1 Produce ELF::R_386_GOTPC relocations.
llvm-svn: 116728
2010-10-18 18:36:12 +00:00
Dan Gohman 33fcde9b9c Make TypeBasedAliasAnalysis default to doing nothing, with a command-line
option to enable it.

llvm-svn: 116722
2010-10-18 18:17:47 +00:00
Dan Gohman 02538ac4d3 Make BasicAliasAnalysis a normal AliasAnalysis implementation which
does normal initialization and normal chaining. Change the default
AliasAnalysis implementation to NoAlias.

Update StandardCompileOpts.h and friends to explicitly request
BasicAliasAnalysis.

Update tests to explicitly request -basicaa.

llvm-svn: 116720
2010-10-18 18:04:47 +00:00
Kevin Enderby b9783dd9bc Added a handful of x86-32 instructions that were missing so that llvm-mc would
be more complete.  These are only expected to be used by llvm-mc with assembly
source so there is no pattern, [], in the .td files.  Most are being added to
X86InstrInfo.td as Chris suggested and only comments about register uses are
added.  Suggestions welcome on the .td changes as I'm not sure on every detail
of the x86 records.  More missing instructions will be coming.

llvm-svn: 116716
2010-10-18 17:04:36 +00:00
Rafael Espindola 3521f8467d Produce a R_386_PLT32 when needed. Moved the default cases of switches to the
start for consistency.

llvm-svn: 116715
2010-10-18 16:58:03 +00:00
Rafael Espindola 4464e0858f Handle GOTOFF correctly on i386.
llvm-svn: 116711
2010-10-18 16:38:04 +00:00
Kalle Raiskila 5f2034c455 Improve lowering of sext to i128 on SPU.
The old algorithm inserted a 'rotqmbyi' instruction which was
both redundant and wrong - it made shufb select bytes from the
wrong end of the input quad.

llvm-svn: 116701
2010-10-18 09:34:19 +00:00
Rafael Espindola 4262a22225 Add a MCObjectFormat class so that code common to all targets that use a
single object format can be shared.

This also adds support for

mov zed+(bar-foo), %eax

on ELF and COFF targets.

llvm-svn: 116675
2010-10-16 18:23:53 +00:00
Benjamin Kramer 0d14b5b0fa Unbreak test on non-COFF targets.
llvm-svn: 116669
2010-10-16 11:27:13 +00:00
Michael J. Spencer 17990d5690 MC-COFF: Add support for default-null weak externals.
llvm-svn: 116666
2010-10-16 08:25:57 +00:00
Michael J. Spencer 5e683250ee X86-Windows: Emit an undefined global __fltused symbol when targeting Windows
if any floating point arguments are passed to an external function.

llvm-svn: 116665
2010-10-16 08:25:41 +00:00
Owen Anderson 18e4fed3fa Generalize MemCpyOpt's handling of call slot forwarding to function properly when the call slot
forwarding is implemented with a load/store pair rather than a memcpy.

llvm-svn: 116637
2010-10-15 22:52:12 +00:00
Mikhail Glushenkov 3ba051a4f6 llvmc: Add a test for the -c flag.
llvm-svn: 116611
2010-10-15 19:30:49 +00:00
Jim Grosbach 68a335e185 ARM mode encoding information for UBFX and SBFX instructions.
llvm-svn: 116588
2010-10-15 17:15:16 +00:00
Jakob Stoklund Olesen f28cc03802 FileCheckize
llvm-svn: 116581
2010-10-15 16:06:42 +00:00
Rafael Espindola fbcf0db7ee Refactor code a bit and avoid creating unnecessary entries in the string
map.

llvm-svn: 116579
2010-10-15 15:39:06 +00:00
Bob Wilson 59351844e1 ARM instructions that are both predicated and set the condition codes
have been printed with the "S" modifier after the predicate.  With ARM's
unified syntax, they are supposed to go in the other order.  We fixed this
for Thumb when we switched to unified syntax but missed changing it for
ARM.  Apparently we don't generate these instructions often because no one
noticed until now.  Thanks to Bill Wendling for the testcase!

llvm-svn: 116563
2010-10-15 03:23:44 +00:00
Jim Grosbach 0b5c743811 Simplify test file a bit.
llvm-svn: 116540
2010-10-14 23:32:44 +00:00
Jim Grosbach 89efff3763 Add testcase for RRX and ASRS (which effectively tests MOVs, since those
are just forms of that instruction).

llvm-svn: 116538
2010-10-14 23:29:18 +00:00
Jim Grosbach 8b6a9c1574 Refactor the MOVsr[al]_flag and RRX pseudo-instructions to really be pseudos
and let the ARMExpandPseudoInsts pass fix them up into the real (MOVs)
instruction form.

llvm-svn: 116534
2010-10-14 22:57:13 +00:00
Jim Grosbach 062749cb25 Tweak the ARM backend to use the RRX mnemonic instead of the 'mov a, b, rrx'
pseudonym.

llvm-svn: 116512
2010-10-14 20:43:44 +00:00
Jim Grosbach eafcb27ded MOVi16 and MOVT ARM mode encodings.
llvm-svn: 116498
2010-10-14 18:54:27 +00:00
Rafael Espindola bee6e9f8e0 Remove some code duplication.
llvm-svn: 116484
2010-10-14 16:34:44 +00:00
Mikhail Glushenkov 793d141b7d Comments.
llvm-svn: 116476
2010-10-14 13:43:20 +00:00
Bill Wendling 6f52f8a87d Add support for vmov.f64/.f32 encoding. There's a bit of a hack going on
here. The f32 in FCONSTS is handled as a double instead of a float in the
code. So the encoding of the immediate into the instruction isn't exactly in
line with the documentation in that regard. But given that we know it's handled
as a double, it doesn't cause any harm.

llvm-svn: 116471
2010-10-14 02:33:26 +00:00
Bill Wendling 0441c6cba0 Add encoding for 'fmstat'.
llvm-svn: 116466
2010-10-14 01:19:34 +00:00
Bill Wendling 0825f3e441 - Add encodings for multiply add/subtract instructions in all their glory.
- Add missing patterns for some multiply add/subtract instructions.
- Add encodings for VMRS and VMSR.

llvm-svn: 116464
2010-10-14 01:02:08 +00:00
Chris Lattner b9681ad442 fix a bug I introduced, no idea how this didn't repro right.
llvm-svn: 116462
2010-10-14 00:30:00 +00:00
Chris Lattner c7bd5740eb hack to unbreak buildbots
llvm-svn: 116461
2010-10-14 00:26:10 +00:00