- Jun 13, 2008
-
-
Duncan Sands authored
wrong for volatile loads and stores. In fact this is almost all of them! There are three types of problems: (1) it is wrong to change the width of a volatile memory access. These may be used to do memory mapped i/o, in which case a load can have an effect even if the result is not used. Consider loading an i32 but only using the lower 8 bits. It is wrong to change this into a load of an i8, because you are no longer tickling the other three bytes. It is also unwise to make a load/store wider. For example, changing an i16 load into an i32 load is wrong no matter how aligned things are, since the fact of loading an additional 2 bytes can have i/o side-effects. (2) it is wrong to change the number of volatile load/stores: they may be counted by the hardware. (3) it is wrong to change a volatile load/store that requires one memory access into one that requires several. For example on x86-32, you can store a double in one processor operation, but to store an i64 requires two (two i32 stores). In a multi-threaded program you may want to bitcast an i64 to a double and store as a double because that will occur atomically, and be indivisible to other threads. So it would be wrong to convert the store-of-double into a store of an i64, because this will become two i32 stores - no longer atomic. My policy here is to say that the number of processor operations for an illegal operation is undefined. So it is alright to change a store of an i64 (requires at least two stores; but could be validly lowered to memcpy for example) into a store of double (one processor op). In short, if the new store is legal and has the same size then I say that the transform is ok. It would also be possible to say that transforms are always ok if before they were illegal, whether after they are illegal or not, but that's more awkward to do and I doubt it buys us anything much. However this exposed an interesting thing - on x86-32 a store of i64 is considered legal! That is because operations are marked legal by default, regardless of whether the type is legal or not. In some ways this is clever: before type legalization this means that operations on illegal types are considered legal; after type legalization there are no illegal types so now operations are only legal if they really are. But I consider this to be too cunning for mere mortals. Better to do things explicitly by testing AfterLegalize. So I have changed things so that operations with illegal types are considered illegal - indeed they can never map to a machine operation. However this means that the DAG combiner is more conservative because before it was "accidentally" performing transforms where the type was illegal because the operation was nonetheless marked legal. So in a few such places I added a check on AfterLegalize, which I suppose was actually just forgotten before. This causes the DAG combiner to do slightly more than it used to, which resulted in the X86 backend blowing up because it got a slightly surprising node it wasn't expecting, so I tweaked it. llvm-svn: 52254
-
- Jun 11, 2008
-
-
Anton Korobeynikov authored
CALLSEQ_BEGIN & CALLSEQ_END. llvm-svn: 52225
-
- Jun 09, 2008
-
-
Rafael Espindola authored
llvm-svn: 52139
-
- Jun 08, 2008
-
-
Duncan Sands authored
of apint codegen failure is the DAG combiner doing the wrong thing because it was comparing MVT's using < rather than comparing the number of bits. Removing the < method makes this mistake impossible to commit. Instead, add helper methods for comparing bits and use them. llvm-svn: 52098
-
- Jun 06, 2008
-
-
Duncan Sands authored
and better control the abstraction. Rename the type to MVT. To update out-of-tree patches, the main thing to do is to rename MVT::ValueType to MVT, and rewrite expressions like MVT::getSizeInBits(VT) in the form VT.getSizeInBits(). Use VT.getSimpleVT() to extract a MVT::SimpleValueType for use in switch statements (you will get an assert failure if VT is an extended value type - these shouldn't exist after type legalization). This results in a small speedup of codegen and no new testsuite failures (x86-64 linux). llvm-svn: 52044
-
Evan Cheng authored
llvm-svn: 52026
-
- Jun 03, 2008
-
-
Dale Johannesen authored
assembler names of string constants look like. llvm-svn: 51909
-
- Jun 02, 2008
-
-
Rafael Espindola authored
llvm-svn: 51865
-
- May 31, 2008
-
-
Dan Gohman authored
index for the input pattern in terms of the output pattern. Instead keep track of how many fixed operands the input pattern actually has, and have the input matching code pass the output-emitting function that index value. This simplifies the code, disentangles variables_ops from the support for predication operations, and makes variable_ops more robust. llvm-svn: 51808
-
- May 30, 2008
-
-
Bill Wendling authored
llvm-svn: 51761
-
- May 29, 2008
-
-
Dan Gohman authored
cases due to an isel deficiency already noted in lib/Target/X86/README.txt, but they can be matched in this fold-call.ll testcase, for example. This is interesting mainly because it exposes a tricky tblgen bug; tblgen was incorrectly computing the starting index for variable_ops in the case of a complex pattern. llvm-svn: 51706
-
Dan Gohman authored
definitions. This adds a new construct, "discard", for indicating that a named node in the input matching pattern is to be discarded, instead of corresponding to a node in the output pattern. This allows tblgen to know where the arguments for the varaible_ops are supposed to begin. This fixes "rdar://5791600", whatever that is ;-). llvm-svn: 51699
-
Dan Gohman authored
memmove to a more plausible value, now that it's actually being used. llvm-svn: 51696
-
Evan Cheng authored
llvm-svn: 51667
-
Bill Wendling authored
llvm-svn: 51664
-
Bill Wendling authored
like. llvm-svn: 51662
-
- May 28, 2008
-
-
Dan Gohman authored
llvm-svn: 51630
-
Mon P Wang authored
is a memory location llvm-svn: 51626
-
Nate Begeman authored
code generator would do something like this: f64 = load f32 <anyext>, f32mem v2f64 = insertelt undef, %0, 0 v2f64 = insertelt %1, 0.0, 1 into v2f64 = vzext_load f32mem which on x86 is movsd, when you really wanted a cvtss2sd/movsd pair. llvm-svn: 51624
-
- May 24, 2008
-
-
Evan Cheng authored
llvm-svn: 51533
-
Evan Cheng authored
Eliminate x86.sse2.movs.d, x86.sse2.shuf.pd, x86.sse2.unpckh.pd, and x86.sse2.unpckl.pd intrinsics. These will be lowered into shuffles. llvm-svn: 51531
-
Evan Cheng authored
llvm-svn: 51526
-
Evan Cheng authored
Remove x86.sse2.loadh.pd and x86.sse2.loadl.pd. These will be lowered into load and shuffle instructions. llvm-svn: 51522
-
- May 23, 2008
-
-
Evan Cheng authored
llvm-svn: 51501
-
Dan Gohman authored
llvm-svn: 51491
-
Evan Cheng authored
llvm-svn: 51490
-
Dan Gohman authored
load-folding table entries for PMULDQ and PMULLD. llvm-svn: 51489
-
Evan Cheng authored
llvm-svn: 51487
-
Chris Lattner authored
instruction for doing this? llvm-svn: 51473
-
Evan Cheng authored
Bug: rcpps can only folds a load if the address is 16-byte aligned. Fixed many 'ps' load folding patterns in X86InstrSSE.td which are missing the proper alignment checks. Also fixed some 80 col. violations. llvm-svn: 51462
-
Dale Johannesen authored
g++.dg/abi/key2.C llvm-svn: 51458
-
Evan Cheng authored
X86CodeEmitter should not set PIC style to None at initialization time. This will break codegen if relocation model is changed to PIC_ later. llvm-svn: 51455
-
- May 22, 2008
-
-
Evan Cheng authored
llvm-svn: 51435
-
- May 20, 2008
-
-
Evan Cheng authored
llvm-svn: 51327
-
Evan Cheng authored
llvm-svn: 51291
-
- May 19, 2008
-
-
Dale Johannesen authored
$non_lazy_ptr's and $lazy_ptr's. llvm-svn: 51277
-
- May 16, 2008
-
-
Dale Johannesen authored
llvm-svn: 51172
-
Evan Cheng authored
llvm-svn: 51165
-
- May 15, 2008
-
-
Evan Cheng authored
Make use of vector load and store operations to implement memcpy, memmove, and memset. Currently only X86 target is taking advantage of these. llvm-svn: 51140
-
- May 14, 2008
-
-
Dale Johannesen authored
are represented as "weak", but there are subtle differences in some cases on Darwin, so we need both. The intent is that "common" will behave identically to "weak" unless somebody changes their target to do something else. No functional change as yet. llvm-svn: 51118
-