Commit Graph

17174 Commits

Author SHA1 Message Date
Devang Patel f3292b2196 Revert r124611 - "Keep track of incoming argument's location while emitting LiveIns."
In other words, do not keep track of argument's location.  The debugger (gdb) is not prepared to see line table entries for arguments. For the debugger, "second" line table entry marks beginning of function body.
This requires some coordination with debugger to get this working. 
 - The debugger needs to be aware of prolog_end attribute attached with line table entries.
 - The compiler needs to accurately mark prolog_end in line table entries (at -O0 and at -O1+)

llvm-svn: 126155
2011-02-21 23:21:26 +00:00
Sean Callanan 5e8603d1b9 Fixed a bug in the X86 disassembler where a member of the
X86 instruction decode structure was being interpreted as
being in units of bits, although it is actually stored in
units of bytes.

llvm-svn: 126147
2011-02-21 21:55:05 +00:00
Richard Osborne 1ae65c7cb8 Add XCore intrinsics for various instructions on ports.
llvm-svn: 126132
2011-02-21 18:23:30 +00:00
Duncan Sands bda7175a43 The stack should be 16 byte aligned on 32 bit solaris. Patch by Yuri.
llvm-svn: 126130
2011-02-21 17:37:17 +00:00
Chris Lattner 5237febf0c a serious "compare CSE" issue that is nontrivial to get right,
but which is responsible for us doing really bad things to 256.bzip2.

llvm-svn: 126126
2011-02-21 17:03:47 +00:00
NAKAMURA Takumi 860abd0f28 Target/X86/X86FastISel: [PR6275] Fix Win32's dllimport function with fastisel.
"dllimport" function must not be GlobalVariable, but Function. It is enough to check with GlobalValue.
test/CodeGen/X86/dll-linkage.ll is updated to check llc -O0.

llvm-svn: 126110
2011-02-21 04:50:06 +00:00
Venkatraman Govindaraju a82203f875 Generate correct Sparc32 ABI compliant code for functions that return a struct.
llvm-svn: 126108
2011-02-21 03:42:44 +00:00
Chris Lattner e9cba7bd34 add a missed loop deletion case.
llvm-svn: 126103
2011-02-21 02:13:39 +00:00
Chris Lattner 659c793a4e add an idiom that loop idiom could theoretically catch.
llvm-svn: 126101
2011-02-21 01:33:38 +00:00
Cameron Zwarich 39314bdbc8 A lo/hi mul has higher latency than an imul r,ri, e.g. 5 cycles compared to 3
on Core 2 and Nehalem, so the code we generate is better than GCC's here.

llvm-svn: 126100
2011-02-21 01:29:32 +00:00
Cameron Zwarich 8731d0cc83 The signed version of our "magic number" computation for the integer approximation
of a constant had a minor typo introduced when copying it from the book, which
caused it to favor negative approximations over positive approximations in many
cases. Positive approximations require fewer operations beyond the multiplication.

In the case of division by 3, we still generate code that is a single instruction
larger than GCC's code.

llvm-svn: 126097
2011-02-21 00:22:02 +00:00
Eric Christopher ac6b001f56 If both operands are loads from stores in memory we can't use movlpd/movlps
since one needs to be a register operand. Just use movss instead of forcing
an operand into a register.

Fixes PR9239

llvm-svn: 126072
2011-02-20 05:04:42 +00:00
Oscar Fuentes ba1186c23e Use explicit add_subdirectory's for LLVM target sublibraries instead
of testing for its presence at cmake time.

This way the build automatically regenerates the makefiles when a svn
update brings in a new sublibrary.

llvm-svn: 126068
2011-02-20 02:55:27 +00:00
Eli Friedman 78b9851a3a Minor x86 README updates.
llvm-svn: 126054
2011-02-19 21:54:28 +00:00
Chris Lattner 47ffd35bea implement PR9264: disambiguating 'bt mem, imm' as a btl.
This is reasonable to do since all bt-mem forms do the
same thing.

llvm-svn: 126047
2011-02-19 21:06:36 +00:00
Eric Christopher c509ff6944 Fix typos.
llvm-svn: 126018
2011-02-19 03:19:09 +00:00
Joerg Sonnenberger 740467a245 Avoid dangling else warnings.
llvm-svn: 126004
2011-02-19 00:43:45 +00:00
Chris Lattner 1341df93f7 add a way to disable all builtins, wire it up to opt's -disable-simplifylibcalls flag.
llvm-svn: 125978
2011-02-18 22:34:03 +00:00
Oscar Fuentes 5ed962656c Move library stuff out of the toplevel CMakeLists.txt file.
llvm-svn: 125968
2011-02-18 22:06:14 +00:00
Chris Lattner 0e125bb4d0 introduce a new TargetLibraryInfo pass, which transformations can use to
query about available library functions.  For now this just has 
memset_pattern16, which exists on darwin, but it can be extended for a 
bunch of other things in the future.

llvm-svn: 125965
2011-02-18 21:50:34 +00:00
Bruno Cardoso Lopes cdd20affec Fix style and a typo
llvm-svn: 125949
2011-02-18 19:49:06 +00:00
Bruno Cardoso Lopes 9cd43977c3 Add assembly parsing support for "msr" and also fix its encoding. Also add
testcases for the disassembler to make sure it still works for "msr".

llvm-svn: 125948
2011-02-18 19:45:59 +00:00
Chris Lattner 0281731cc2 add a poor division by constant case.
llvm-svn: 125832
2011-02-18 05:35:49 +00:00
Joerg Sonnenberger f69c80bac2 Recognize monitor/mwait with explicit register arguments
llvm-svn: 125805
2011-02-18 00:48:11 +00:00
Joerg Sonnenberger 889a508157 Recognize leavel and leaveq aliases for leave.
Validate encoding of leave in 64bit mode.

llvm-svn: 125795
2011-02-17 23:36:39 +00:00
David Greene 3a2b508e8f [AVX] Recorganize X86ShuffleDecode into its own library
(LLVMX86Utils.a) to break cyclic library dependencies between
LLVMX86CodeGen.a and LLVMX86AsmParser.a.  Previously this code was in
a header file and marked static but AVX requires some additional
functionality here that won't be used by all clients.  Since including
unused static functions causes a gcc compiler warning, keeping it as a
header would break builds that use -Werror.  Putting this in its own
library solves both problems at once.

llvm-svn: 125765
2011-02-17 19:18:59 +00:00
Dan Gohman f0f8e14370 The labyrinthine X86 backend no longer appears to require
these patterns.

llvm-svn: 125759
2011-02-17 18:50:19 +00:00
NAKAMURA Takumi 4c14a5cc2c Triple::MinGW64 is deprecated and removed. We can use Triple::MinGW32 generally.
No one uses *-mingw64. mingw-w64 is represented as {i686|x86_64}-w64-mingw32. In llvm side, i686 and x64 can be treated as similar way.

llvm-svn: 125747
2011-02-17 12:24:17 +00:00
NAKAMURA Takumi 0544fe7287 Fix whitespace.
llvm-svn: 125746
2011-02-17 12:23:50 +00:00
Duncan Sands 491eb276a7 This has been implemented.
llvm-svn: 125738
2011-02-17 08:16:56 +00:00
Chris Lattner 727eebee58 add some notes on compares + binops. Remove redundant entries.
llvm-svn: 125702
2011-02-17 01:43:46 +00:00
Chris Lattner 28bf91f78e Add a few missed xforms from GCC PR14753
llvm-svn: 125681
2011-02-16 19:16:34 +00:00
Stuart Hastings 81c4306005 Swap VT and DebugLoc operands of getExtLoad() for consistency with
other getNode() methods.  Radar 9002173.

llvm-svn: 125665
2011-02-16 16:23:55 +00:00
Eli Friedman c8fb2557b9 Remove outdated README entry.
llvm-svn: 125660
2011-02-16 07:41:19 +00:00
Eli Friedman 0254c4c01b Remove outdated README entry.
llvm-svn: 125659
2011-02-16 07:18:18 +00:00
Eli Friedman 5f75515e5d Update README entry.
llvm-svn: 125658
2011-02-16 07:17:44 +00:00
Rafael Espindola 58ac6e1677 Add support for pushsection and popsection. Patch by Joerg Sonnenberger.
llvm-svn: 125629
2011-02-16 01:08:29 +00:00
Evan Cheng 4a8c43fe6d Some single precision VFP instructions may be executed on NEON pipeline, but not double precision ones.
llvm-svn: 125624
2011-02-16 00:35:02 +00:00
Jakob Stoklund Olesen d9c80ef837 Teach ARMLoadStoreOptimizer to remove kill flags from merged instructions as well.
This is necessary to avoid a crash in certain tangled situations where a kill
flag is first correctly moved to a merged instruction, and then needs to be
moved again:

  STR %R0, a...
  STR %R0<kill>, b...

First becomes:

  STR %R0, b...
  STM a, %R0<kill>, ...

and then:

  STM a, %R0, ...
  STM b, %R0<kill>, ...

We can now remove the kill flag from the merged STM when needed. 8960050.

llvm-svn: 125591
2011-02-15 19:51:58 +00:00
Duncan Sands 75b5d27b84 Spelling fix: consequtive -> consecutive.
llvm-svn: 125563
2011-02-15 09:23:02 +00:00
Bob Wilson 9cd0b581b8 Remove unused bitvectors that record ARM callee-saved registers.
llvm-svn: 125534
2011-02-14 23:40:38 +00:00
Bruno Cardoso Lopes 57a522f30d A fail to match coprocessor number and register number must fail instead of assert.
llvm-svn: 125521
2011-02-14 21:10:33 +00:00
Bruno Cardoso Lopes 90d1dfe4c6 Fix encoding and add parsing support for the arm/thumb CPS instruction:
- Add custom operand matching for imod and iflags.
- Rename SplitMnemonicAndCC to SplitMnemonic since it splits more than CC
  from mnemonic.
- While adding ".w" as an operand, don't change "Head" to avoid passing the
  wrong mnemonic to ParseOperand.
- Add asm parser tests.
- Add disassembler tests just to make sure it can catch all cps versions.

llvm-svn: 125489
2011-02-14 13:09:44 +00:00
Chris Lattner 46c01a30f4 Enhance ComputeMaskedBits to know that aligned frameindexes
have their low bits set to zero.  This allows us to optimize
out explicit stack alignment code like in stack-align.ll:test4 when
it is redundant.

Doing this causes the code generator to start turning FI+cst into
FI|cst all over the place, which is general goodness (that is the
canonical form) except that various pieces of the code generator
don't handle OR aggressively.  Fix this by introducing a new
SelectionDAG::isBaseWithConstantOffset predicate, and using it
in places that are looking for ADD(X,CST).  The ARM backend in
particular was missing a lot of addressing mode folding opportunities
around OR.

llvm-svn: 125470
2011-02-13 22:25:43 +00:00
Reid Kleckner 2406b7d179 Add encodings and mnemonics for FXSAVE64 and FXRSTOR64.
These are just FXSAVE and FXRSTOR with REX.W prefixes.  These versions use
64-bit pointer values instead of 32-bit pointer values in the memory map they
dump and restore.

llvm-svn: 125446
2011-02-12 23:24:13 +00:00
Venkatraman Govindaraju 0c1f65317b Prevent IMPLICIT_DEF/KILL to become a delay filler instruction in SPARC backend.
llvm-svn: 125444
2011-02-12 19:02:33 +00:00
Benjamin Kramer 69affe6a94 Add a note about SSE4.1 roundss/roundsd.
llvm-svn: 125438
2011-02-12 17:58:16 +00:00
Jim Grosbach 861e49ce3b AsmMatcher custom operand parser failure enhancements.
Teach the AsmMatcher handling to distinguish between an error custom-parsing
an operand and a failure to match. The former should propogate the error
upwards, while the latter should continue attempting to parse with
alternative matchers.

Update the ARM asm parser accordingly.

llvm-svn: 125426
2011-02-12 01:34:40 +00:00
Nate Begeman fa62d50481 Implement sdiv & udiv for <4 x i16> and <8 x i8> NEON vector types.
This avoids moving each element to the integer register file and calling __divsi3 etc. on it.

llvm-svn: 125402
2011-02-11 20:53:29 +00:00
Rafael Espindola 34b59389ea Remove std::string version of getNameWithPrefix.
llvm-svn: 125363
2011-02-11 05:23:09 +00:00