Commit Graph

66536 Commits

Author SHA1 Message Date
Duncan Sands 900edd4b54 Fix a comment typo.
llvm-svn: 118168
2010-11-03 11:55:03 +00:00
Duncan Sands f5dda01f33 Inside the calling convention logic LocVT is always a simple
value type, so there is no point in passing it around using
an EVT.  Use the simpler MVT everywhere.  Rather than trying
to propagate this information maximally in all the code that
using the calling convention stuff, I chose to do a mainly
low impact change instead.

llvm-svn: 118167
2010-11-03 11:35:31 +00:00
Eric Christopher fcc9e6848a If we have an undef mask our Elt will be -1 for our access, handle
this by using an undef as a pointer.

Fixes rdar://8625016

llvm-svn: 118164
2010-11-03 09:36:40 +00:00
Duncan Sands 8eb254aed6 Fix typo, pointed out by Trevor Harmon.
llvm-svn: 118163
2010-11-03 08:16:50 +00:00
Evan Cheng 8740ee3637 Fix preload instruction isel. Only v7 supports pli, and only v7 with mp extension supports pldw. Add subtarget attribute to denote mp extension support and legalize illegal ones to nothing.
llvm-svn: 118160
2010-11-03 06:34:55 +00:00
Evan Cheng 6f36042557 Add support to match @llvm.prefetch to pld / pldw / pli. rdar://8601536.
llvm-svn: 118152
2010-11-03 05:14:24 +00:00
Bill Wendling 6552a109bb Put the PC encoding in the correct bit position.
llvm-svn: 118151
2010-11-03 04:57:44 +00:00
Eric Christopher c63d846ad6 Invert these branches by default, it makes assembly comparisons a little
easier to read.

llvm-svn: 118148
2010-11-03 04:29:11 +00:00
Bill Wendling e84eb99cbb The MC code couldn't handle ARM LDR instructions with negative offsets:
vldr.64 d1, [r0, #-32]

The problem was with how the addressing mode 5 encodes the offsets. This change
makes sure that the way offsets are handled in addressing mode 5 is consistent
throughout the MC code. It involves re-refactoring the "getAddrModeImmOpValue"
method into an "Imm12" and "addressing mode 5" version. But not to worry! The
majority of the duplicated code has been unified.

llvm-svn: 118144
2010-11-03 01:49:29 +00:00
Dan Gohman 68fb004616 Fix DAGCombiner to avoid going into an infinite loop when it
encounters (and:i64 (shl:i64 (load:i64), 1), 0xffffffff).
This fixes rdar://8606584.

llvm-svn: 118143
2010-11-03 01:47:46 +00:00
Jim Grosbach fd96701456 Remove unused function.
llvm-svn: 118141
2010-11-03 01:35:15 +00:00
Jim Grosbach e7f7de95e0 Remove the no longer used 'Modifier' optional operand to the ARM
printOperand() asm printer helper functions. rdar://8425198

llvm-svn: 118140
2010-11-03 01:11:15 +00:00
Jim Grosbach 50ba3c09bf Remove unused function.
llvm-svn: 118139
2010-11-03 01:07:48 +00:00
Jim Grosbach c6af2b4066 Break ARM addrmode4 (load/store multiple base address) into its constituent
parts. Represent the operation mode as an optional operand instead.
rdar://8614429

llvm-svn: 118137
2010-11-03 01:01:43 +00:00
Evan Cheng debf9c502a Two sets of changes. Sorry they are intermingled.
1. Fix pre-ra scheduler so it doesn't try to push instructions above calls to
   "optimize for latency". Call instructions don't have the right latency and
   this is more likely to use introduce spills.
2. Fix if-converter cost function. For ARM, it should use instruction latencies,
   not # of micro-ops since multi-latency instructions is completely executed
   even when the predicate is false. Also, some instruction will be "slower"
   when they are predicated due to the register def becoming implicit input.
   rdar://8598427

llvm-svn: 118135
2010-11-03 00:45:17 +00:00
Evan Cheng 634ab6c2b7 Modify scheduling itineraries to correct instruction latencies (not operand
latencies) of loads.

llvm-svn: 118134
2010-11-03 00:40:22 +00:00
Dan Gohman edc76749b3 Factor code out of APInt to form a isUIntN helper function.
llvm-svn: 118133
2010-11-03 00:38:40 +00:00
Chris Lattner 3e6c919469 fix typo, patch by Trevor Harmon (PR8537)
llvm-svn: 118131
2010-11-03 00:30:29 +00:00
Dan Gohman 0baea2aa1b Print an error as one big string instead of breaking it up.
llvm-svn: 118130
2010-11-03 00:24:33 +00:00
Dan Gohman a3bb142db6 Delete unused variables.
llvm-svn: 118128
2010-11-03 00:09:12 +00:00
Dan Gohman ecc4d73498 Remove several unhelpful checks for isValid from sys::Path.
llvm-svn: 118127
2010-11-03 00:01:23 +00:00
Eric Christopher 1e43892e4b Make sure we're only storing a single bit here.
llvm-svn: 118126
2010-11-02 23:59:09 +00:00
Chris Lattner 9c9bfb6870 per a suggestion by Frits van Bommel, mark all MBlaze Pseudo
instructions as isCodeGenOnly in the parent class instead of
sprinkling it throughout the .td files.

llvm-svn: 118125
2010-11-02 23:57:05 +00:00
Chris Lattner 11d21e8e78 chase owen.
llvm-svn: 118124
2010-11-02 23:55:24 +00:00
Chris Lattner d0502c1777 tweak this to pass.
llvm-svn: 118122
2010-11-02 23:50:17 +00:00
Owen Anderson 0ebd1fd594 Revert r118097 to fix buildbots.
llvm-svn: 118121
2010-11-02 23:47:29 +00:00
Chris Lattner daf7a2a7de temporarily xfail this.
llvm-svn: 118120
2010-11-02 23:44:50 +00:00
Chris Lattner cc5dce89d4 Completely reject instructions that have an operand in their
ins/outs list that isn't specified by their asmstring.  Previously
the asmmatcher would just force a 0 register into it, which clearly
isn't right.  Mark a bunch of ARM instructions that use this as 
isCodeGenOnly.  Some of them are clearly pseudo instructions (like
t2TBB) others use a weird hasExtraSrcRegAllocReq thing that will
either need to be removed or the asmmatcher will need to be taught
about it (someday).

llvm-svn: 118119
2010-11-02 23:40:41 +00:00
Jakob Stoklund Olesen 1d73c0e462 Tweak the opt -O2 / opt -O3 inliner thresholds to be the same as llvm-gcc and
clang are using.

llvm-svn: 118118
2010-11-02 23:40:28 +00:00
Jakob Stoklund Olesen 31a7eb40c1 Let the -inline-threshold command line argument take precedence over the
threshold given to createFunctionInliningPass().

Both opt -O3 and clang would silently ignore the -inline-threshold option.

llvm-svn: 118117
2010-11-02 23:40:26 +00:00
Dan Gohman c0a8bee4b0 Don't try to enforce MAXPATHLEN in sys::Path for Unix. OS's can check
limits on their own.

llvm-svn: 118113
2010-11-02 23:19:55 +00:00
Chris Lattner 4d23eb2f0e make MatchableInfo::Validate reject instructions (like LDR_PRE in ARM)
that have complicated tying going on.

llvm-svn: 118112
2010-11-02 23:18:43 +00:00
Dan Gohman a8b6315cd7 Simplify.
llvm-svn: 118110
2010-11-02 23:16:26 +00:00
John Thompson beffa5bef1 Inline asm mult-alt constraint tests.
llvm-svn: 118107
2010-11-02 23:01:44 +00:00
Dan Gohman 6e05d6c218 Fix a copy+pasto.
llvm-svn: 118106
2010-11-02 22:56:51 +00:00
Dan Gohman a47bfef1bf Avoid manipulating paths in fixed-sized arrays.
llvm-svn: 118105
2010-11-02 22:55:34 +00:00
Chris Lattner e032dbfd9e rewrite EmitConvertToMCInst to iterate over the MCInst operands,
filling them in one at a time.  Previously this iterated over the
asmoperands, which left the problem of "holes".  The new approach
simplifies things.

llvm-svn: 118104
2010-11-02 22:55:03 +00:00
Bill Wendling f9eebb58b9 Obsessive formatting changes. No functionality impact.
llvm-svn: 118103
2010-11-02 22:53:11 +00:00
Dan Gohman 32d51fa0b5 Simplify this code.
llvm-svn: 118102
2010-11-02 22:50:10 +00:00
Bill Wendling 23436b6530 Omit unused parameter name.
llvm-svn: 118099
2010-11-02 22:46:04 +00:00
Bill Wendling 91da9abbee Simplify the EncodeInstruction method now that a lot of the special case stuff
is handled with the MC encoder.

llvm-svn: 118098
2010-11-02 22:44:12 +00:00
Owen Anderson 7c30390277 Since these fields are not exactly equivalent to the encoded field, rename them to something with semantic meaning.
llvm-svn: 118097
2010-11-02 22:41:42 +00:00
Dan Gohman f6e13ceb2b Use '\0' instead of 0 for nul character constants.
llvm-svn: 118096
2010-11-02 22:41:19 +00:00
Bill Wendling 603bd8f54c Rename getAddrModeImm12OpValue to getAddrModeImmOpValue and expand it to work
with immediates up to 16-bits in size. The same logic is applied to other LDR
encodings, e.g. VLDR, but which use a different immediate bit width (8-bits in
VLDR's case). Removing the "12" allows it to be more generic.

llvm-svn: 118094
2010-11-02 22:31:46 +00:00
Owen Anderson a4b63e19d2 Rename encoder methods to match naming convention.
llvm-svn: 118093
2010-11-02 22:28:01 +00:00
Chris Lattner 15977afb02 mark a few codegenonly instructions.
llvm-svn: 118092
2010-11-02 22:26:33 +00:00
Mikhail Glushenkov 7282901079 appendSuffix: don't append a dot when the suffix is empty.
Additionally, move the implementation of appendSuffix to Path.cpp: it is
platform-independent.

llvm-svn: 118089
2010-11-02 22:18:37 +00:00
Mikhail Glushenkov 4fb337560c Revert r118057, this is better fixed in appendSuffix itself.
llvm-svn: 118088
2010-11-02 22:18:28 +00:00
Owen Anderson dec87e10fd Provide correct encodings for the remaining vst variants that we currently generate.
llvm-svn: 118087
2010-11-02 22:18:18 +00:00
Dan Gohman 44e24e5403 Eliminate some temporary std::strings.
llvm-svn: 118086
2010-11-02 22:07:47 +00:00