1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00
Commit Graph

87584 Commits

Author SHA1 Message Date
Eric Christopher
0f1dd74523 Split out abbreviations for the skeleton info from the rest of
the abbreviations. Part of implementing split dwarf.

llvm-svn: 170589
2012-12-19 22:02:53 +00:00
Jakob Stoklund Olesen
eab040c93e Remove the explicit MachineInstrBuilder(MI) constructor.
Use the version that also takes an MF reference instead.

It would technically be possible to extract an MF reference from the MI
as MI->getParent()->getParent(), but that would not work for MIs that
are not inserted into any basic block.

Given the reasonably small number of places this constructor was used at
all, I preferred the compile time check to a run time assertion.

llvm-svn: 170588
2012-12-19 21:31:56 +00:00
Nadav Rotem
ec80e57326 Fix a bug that was found by building clang with -fsanitize.
I introduced it in r166785. PR14291.

If TD is unavailable use getScalarSizeInBits, but don't optimize
pointers or vectors of pointers.

llvm-svn: 170586
2012-12-19 20:47:04 +00:00
Meador Inge
cdf8b19f0b docs: Fix title underline warnings
Building Vectorizers.rst produces a few warnings of the form:

   WARNING: Title underline too short.

Fixed by adding the extra needed dashes under the title.

llvm-svn: 170582
2012-12-19 20:16:40 +00:00
Evan Cheng
82e8360cf3 LLVM sdisel normalize bit extraction of the form:
((x & 0xff00) >> 8) << 2
to
 (x >> 6) & 0x3fc

This is general goodness since it folds a left shift into the mask. However,
the trailing zeros in the mask prevents the ARM backend from using the bit
extraction instructions. And worse since the mask materialization may require
an addition instruction. This comes up fairly frequently when the result of 
the bit twiddling is used as memory address. e.g.

 = ptr[(x & 0xFF0000) >> 16]

We want to generate:
  ubfx   r3, r1, #16, #8
  ldr.w  r3, [r0, r3, lsl #2]

vs.
  mov.w  r9, #1020
  and.w  r2, r9, r1, lsr #14
  ldr    r2, [r0, r2]

Add a late ARM specific isel optimization to
ARMDAGToDAGISel::PreprocessISelDAG(). It folds the left shift to the
'base + offset' address computation; change the mask to one which doesn't have
trailing zeros and enable the use of ubfx.

Note the optimization has to be done late since it's target specific and we
don't want to change the DAG normalization. It's also fairly restrictive
as shifter operands are not always free. It's only done for lsh 1 / 2. It's
known to be free on some cpus and they are most common for address
computation.

This is a slight win for blowfish, rijndael, etc.

rdar://12870177

llvm-svn: 170581
2012-12-19 20:16:09 +00:00
Benjamin Kramer
9a5e8dfdb9 Remove edis remnant.
llvm-svn: 170580
2012-12-19 20:11:17 +00:00
Roman Divacky
7a967134bc Remove edis - the enhanced disassembler. Fixes PR14654.
llvm-svn: 170578
2012-12-19 19:55:47 +00:00
Paul Redmond
b0b73c2c50 Transform (x&C)>V into (x&C)!=0 where possible
When the least bit of C is greater than V, (x&C) must be greater than V
if it is not zero, so the comparison can be simplified.

Although this was suggested in Target/X86/README.txt, it benefits any
architecture with a directly testable form of AND.

Patch by Kevin Schoedel

llvm-svn: 170576
2012-12-19 19:47:13 +00:00
Jakob Stoklund Olesen
8ae006400b Add an MF argument to MachineInstr::addOperand().
Just like for addMemOperand(), the function pointer provides a context
for allocating memory. This will make it possible to use a better memory
allocation strategy for the MI operand list, which is currently a slow
std::vector.

Most calls to addOperand() come from MachineInstrBuilder, so give that
class an MF reference as well. Code using BuildMI() won't need changing
at all since the MF reference is already required to allocate a
MachineInstr.

Future patches will fix code that calls MI::addOperand(Op) directly, as
well as code that uses the now deprecated MachineInstrBuilder(MI)
constructor.

llvm-svn: 170574
2012-12-19 19:19:01 +00:00
Chad Rosier
2622e09aff Remove superfluous brief command from getAsString.
llvm-svn: 170569
2012-12-19 18:06:44 +00:00
Nadav Rotem
2d9db52f43 doc: add subsections.
llvm-svn: 170568
2012-12-19 18:04:44 +00:00
Nadav Rotem
06dc587cd6 DOC: document the use of O2, O3 and Os with -fvectorize.
llvm-svn: 170567
2012-12-19 18:02:36 +00:00
Benjamin Kramer
fac7a73ad8 PowerPC: Expand VSELECT nodes.
There's probably a better expansion for those nodes than the default for
altivec, but this is better than crashing. VSELECTs occur in loop vectorizer
output.

llvm-svn: 170551
2012-12-19 15:49:14 +00:00
Patrik Hagglund
001eb3f34b Change AsmOperandInfo::ConstraintVT to MVT, instead of EVT.
Accordingly, add MVT::getVT.

llvm-svn: 170550
2012-12-19 15:19:11 +00:00
Rafael Espindola
e919c7cf9e Revert 170545 while I debug the ppc failures.
llvm-svn: 170547
2012-12-19 14:48:05 +00:00
Benjamin Kramer
27ce655c41 Make TargetLowering::getTypeConversion more resilient against odd illegal MVTs.
- An MVT can become an EVT when being split (e.g. v2i8 -> v1i8, the latter doesn't exist)
- Return the scalar value when an MVT is scalarized (v1i64 -> i64)

Fixes PR14639ff.

llvm-svn: 170546
2012-12-19 14:34:28 +00:00
Rafael Espindola
f95d54b477 Add r170095 back.
I cannot reproduce it the failures locally, so I will keep an eye at the ppc
bots. This patch does add the change to the "Disassembly of section" message,
but that is not what was failing on the bots.

Original message:

Add a funciton to get the segment name of a section.

On MachO, sections also have segment names. When a tool looking at a .o file
prints a segment name, this is what they mean. In reality, a .o has only one
anonymous, segment.

This patch adds a MachO only function to fetch that segment name. I named it
getSectionFinalSegmentName since the main use for the name seems to be infor
the linker with segment this section should go to.

The patch also changes MachOObjectFile::getSectionName to return just the
section name instead of computing SegmentName,SectionName.

llvm-svn: 170545
2012-12-19 14:15:04 +00:00
Evgeniy Stepanov
a0f0c84fb8 [msan] Add track-origins argument to the pass constructor.
llvm-svn: 170544
2012-12-19 13:55:51 +00:00
Dmitri Gribenko
fab42cd17b Documentation: add a missing space
llvm-svn: 170542
2012-12-19 12:51:48 +00:00
Patrik Hagglund
6604172d9c Split the usage of 'EVT PartVT' into 'MVT PartVT' and 'EVT PartEVT'.
llvm-svn: 170540
2012-12-19 12:33:30 +00:00
Alexey Samsonov
d4a38a4ec8 CMake: factor out a function that returns the expected directory for unit test
llvm-svn: 170539
2012-12-19 12:30:33 +00:00
Patrik Hagglund
7f3c62dead Change RegVT in BitTestBlock and RegsForValue, to contain MVTs,
instead of EVTs.

llvm-svn: 170538
2012-12-19 12:23:01 +00:00
Patrik Hagglund
ed576de43f Change TargetLowering::getTypeForExtArgOrReturn to take and return
MVTs, instead of EVTs.

llvm-svn: 170537
2012-12-19 12:02:25 +00:00
Patrik Hagglund
3c3484ff9a Change a parameter of TargetLowering::getVectorTypeBreakdown to MVT,
from EVT.

llvm-svn: 170536
2012-12-19 11:53:21 +00:00
Patrik Hagglund
693f5e9763 Change TargetLowering::RegisterTypeForVT to contain MVTs, instead of
EVTs.

llvm-svn: 170535
2012-12-19 11:48:16 +00:00
Patrik Hagglund
fbf8078754 Change TargetLowering::TransformToType to contain MVTs, instead of
EVTs.

llvm-svn: 170534
2012-12-19 11:42:00 +00:00
Patrik Hagglund
98dc3fe631 Change TargetLowering::getRepRegClassCostFor, getIndexedLoadAction,
getIndexedStoreAction, and addRegisterClass to take and MVT, instead
of EVT.

llvm-svn: 170533
2012-12-19 11:37:12 +00:00
Patrik Hagglund
0515a9093d Change TargetLowering::findRepresentativeClass to take an MVT, instead
of EVT.

llvm-svn: 170532
2012-12-19 11:30:36 +00:00
Evgeniy Stepanov
454a4043ba [msan] Heuristically instrument unknown intrinsics.
This changes adds shadow and origin propagation for unknown intrinsics
by examining the arguments and ModRef behaviour. For now, only 3 classes
of intrinsics are handled:
- those that look like simple SIMD store
- those that look like simple SIMD load
- those that don't have memory effects and look like arithmetic/logic/whatever
  operation on simple types.

llvm-svn: 170530
2012-12-19 11:22:04 +00:00
Patrik Hagglund
de06c30db0 Change TargetLowering::getTypeToPromoteTo to take and return MVTs,
instead of EVTs.

llvm-svn: 170529
2012-12-19 11:21:04 +00:00
Benjamin Kramer
7cecaab3f7 LoopVectorize: Make iteration over induction variables not depend on pointer values.
MapVector is a bit heavyweight, but I don't see a simpler way. Also the
InductionList is unlikely to be large. This should help 3-stage selfhost
compares (PR14647).

llvm-svn: 170528
2012-12-19 11:09:15 +00:00
Benjamin Kramer
3994644f37 MapVector: Add lookup().
llvm-svn: 170527
2012-12-19 11:08:33 +00:00
Patrik Hagglund
c81d1cc216 Change TargetLowering::isCondCodeLegal to take an MVT, instead of EVT.
llvm-svn: 170524
2012-12-19 10:19:55 +00:00
NAKAMURA Takumi
dead4f722b X86ISelLowering.cpp: Fix warnings. [-Wlogical-op-parentheses]
llvm-svn: 170523
2012-12-19 10:12:48 +00:00
Patrik Hagglund
6f133a259d Change TargetLowering::getCondCodeAction to take an MVT, instead of
EVT.

llvm-svn: 170522
2012-12-19 10:09:26 +00:00
Bill Wendling
c3431fa484 Inline hasFunctionOnlyAttrs into its only use.
llvm-svn: 170518
2012-12-19 09:15:11 +00:00
Bill Wendling
5fc2007a7f Inline the only use of the hasParameterOnlyAttrs method.
llvm-svn: 170517
2012-12-19 09:04:58 +00:00
Bill Wendling
620587ed25 Inline the 'hasIncompatibleWithVarArgsAttrs' method into its only uses. And some minor comment reformatting.
llvm-svn: 170516
2012-12-19 08:57:40 +00:00
Nadav Rotem
833bf77529 DOC: fix the url format.
llvm-svn: 170513
2012-12-19 08:43:05 +00:00
Patrik Hagglund
79b70f34a2 Change TargetLowering::getTruncStoreAction to take MVTs, instead of EVTs.
llvm-svn: 170510
2012-12-19 08:28:51 +00:00
Nadav Rotem
10ed93e100 DOC: add a benchmarks that compares us to gcc and icc.
llvm-svn: 170509
2012-12-19 08:28:24 +00:00
Elena Demikhovsky
12a5e01a52 Optimized load + SIGN_EXTEND patterns in the X86 backend.
llvm-svn: 170506
2012-12-19 07:50:20 +00:00
Nadav Rotem
626e9199af After reducing the size of an operation in the DAG we zero-extend the reduced
bitwidth op back to the original size. If we reduce ANDs then this can cause
an endless loop. This patch changes the ZEXT to ANY_EXTEND if the demanded bits
are equal or smaller than the size of the reduced operation.

llvm-svn: 170505
2012-12-19 07:39:08 +00:00
Nadav Rotem
19ffa12ce1 docs: fix typos.
llvm-svn: 170504
2012-12-19 07:36:35 +00:00
Nadav Rotem
e42a1b9f42 DOC: Add a webpage that describes the loop and bb vectorizers.
llvm-svn: 170503
2012-12-19 07:22:24 +00:00
Bill Wendling
56d9c4b832 Rename the 'Attributes' class to 'Attribute'. It's going to represent a single attribute in the future.
llvm-svn: 170502
2012-12-19 07:18:57 +00:00
Craig Topper
a5c7087cc4 Remove more of 'else's after 'returns'. No functional change.
llvm-svn: 170497
2012-12-19 06:43:58 +00:00
Craig Topper
8b9784ee6e Remove a bunch of 'else's after 'returns'
llvm-svn: 170496
2012-12-19 06:39:17 +00:00
Craig Topper
ba9bcee7f1 Teach SimplifySetCC that comparing AssertZext i1 against a constant 1 can be rewritten as a compare against a constant 0 with the opposite condition.
llvm-svn: 170495
2012-12-19 06:12:28 +00:00
Reed Kotler
c3d7268c6e Add some missing Defs and Uses.
llvm-svn: 170493
2012-12-19 04:06:15 +00:00