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

85972 Commits

Author SHA1 Message Date
Nadav Rotem
451f76acc3 vectorizer: Add support for reading and writing from the same memory location.
llvm-svn: 166255
2012-10-19 01:24:18 +00:00
Nadav Rotem
3cce3abf28 Reapply the TargerTransformInfo changes, minus the changes to LSR and Lowerinvoke.
llvm-svn: 166248
2012-10-18 23:22:48 +00:00
Nadav Rotem
fe5d8c8c09 cleanup the comment.
llvm-svn: 166247
2012-10-18 23:21:01 +00:00
Jordan Rose
2d1d4bb52f Fix case for include of Compiler.h.
llvm-svn: 166243
2012-10-18 22:36:01 +00:00
Jordan Rose
254e676432 Add move constructors for OwningPtr and OwningArrayPtr.
While LLVM itself is still C++03, there's no reason why tools built on
top of it can't use C++11 features.

llvm-svn: 166242
2012-10-18 22:22:58 +00:00
Jordan Rose
8f3fa09912 Add a T&& constructor to llvm::Optional.
This allows llvm::Optional to be used with movable-but-not-copyable types.
While LLVM itself is still C++03, there's no reason why tools built on
top of it can't use C++11 features.

llvm-svn: 166241
2012-10-18 22:22:55 +00:00
Bob Wilson
93c7551fe3 Mark bugpoint tests with XFAIL when building with LTO. <rdar://problem/12473675>
The LTO Internalize pass is hiding symbols needed by the bugpoint-passes
plug-in.  We need to add a flag to control whether Internalize should be run.
This is a temporary workaround to make these tests pass in the meantime.

llvm-svn: 166239
2012-10-18 22:03:31 +00:00
Kevin Enderby
300b29c6b4 Fix a bug where a 32-bit address with the high bit does not get symbolicated
because the value is incorrectly being signed extended when passed to
SymbolLookUp().

llvm-svn: 166234
2012-10-18 21:49:18 +00:00
Nadav Rotem
ac2f32d807 fix a naming typo
llvm-svn: 166232
2012-10-18 21:45:31 +00:00
Daniel Dunbar
0f4b851ce7 test: Add a lit config variable to check if LTO is enabled.
llvm-svn: 166225
2012-10-18 20:43:11 +00:00
Daniel Dunbar
edc1b1982d lit: Allow XFAIL: lines to also refer to "features".
llvm-svn: 166224
2012-10-18 20:43:04 +00:00
Chad Rosier
2a7f9576bc [ms-inline asm] Add a size argument to the LookupInlineAsmIdentifier() callback,
which will be used by the asm matcher in the near future.

llvm-svn: 166222
2012-10-18 20:27:15 +00:00
Bob Wilson
62af1bf601 Use an export list when building JIT unittests. <rdar://problem/12473675>
When building with LTO, the internalize pass is hiding some global symbols
that are necessary for the JIT unittests. It seems like that may be a bug in
LTO to do that by default, but until that gets fixed, this change makes sure
that we export the necessary symbols for the tests to pass.

llvm-svn: 166220
2012-10-18 20:25:36 +00:00
Sebastian Pop
324f8ad699 Use pre-python 2.5 syntax in lit.cfg.
Author:    Quentin Neill <qneill@codeaurora.org>
llvm-svn: 166217
2012-10-18 19:58:28 +00:00
Sebastian Pop
2e267f64cb Clear unknown mem ops when merging stack slots (pr14090)
When merging stack slots, if StackColoring::remapInstructions gets a
value back from GetUnderlyingObject that it does not know about or is
not itself a stack slot, clear the memory operand in case it aliases
the merged slot. This prevents the introduction of incorrect aliasing
information.

Author:    Matthew Curtis <mcurtis@codeaurora.org>
llvm-svn: 166216
2012-10-18 19:53:48 +00:00
Sebastian Pop
23cbb6a693 Change MachineFrameInfo::StackObject::Alloca from Value* to AllocaInst*
This more accurately reflects what is actually being stored in the
field.

No functionality change intended.

Author:    Matthew Curtis <mcurtis@codeaurora.org>
llvm-svn: 166215
2012-10-18 19:53:45 +00:00
Chad Rosier
5c17ae1754 [ms-inline asm] Have the LookupInlineAsmIdentifier() callback function return a
*NamedDecl.  In turn, build the expressions after we're finished parsing the
asm.  This avoids a crasher if the lookup fails.

llvm-svn: 166212
2012-10-18 19:39:30 +00:00
Bob Wilson
8e22c076f2 Revert "We need this symbol after an LTO build."
This reverts commit 165776.  The plug-in uses this symbol; it does not
define it.  It needs to be exported from bugpoint itself, not from the plug-in.

llvm-svn: 166207
2012-10-18 18:52:54 +00:00
Nadav Rotem
b1d0bfd68b Avoid reconstructing the pointer set when searching for duplicated read/write pointers.
llvm-svn: 166205
2012-10-18 18:34:50 +00:00
Micah Villmow
f708318a81 Update the LangRef documentation for the per pointer address space support.
llvm-svn: 166201
2012-10-18 18:18:17 +00:00
Meador Inge
90bff969e1 Cosmetic change -- move two simplifiers to the right commented statement group.
llvm-svn: 166199
2012-10-18 18:12:43 +00:00
Meador Inge
4cd6c97082 instcombine: Migrate strcpy optimizations
This patch migrates the strcpy optimizations from the simplify-libcalls pass
into the instcombine library call simplifier.  Note also that StrCpyChkOpt
has been updated with a few simplifications that were being done in the
simplify-libcalls version of StrCpyOpt, but not in the migrated implementation
of StrCpyOpt.  There is no reason to overload StrCpyOpt with fortified and
regular simplifications in the new model since there is already a dedicated
simplifier for __strcpy_chk.

llvm-svn: 166198
2012-10-18 18:12:40 +00:00
Eli Bendersky
d53d4452a7 test commit: verifying access from new address
llvm-svn: 166197
2012-10-18 18:12:05 +00:00
Nadav Rotem
12105d6078 In SimplifySelectOps we pulled two loads through a select node despite the fact that one was dependent on the other.
rdar://12513091

llvm-svn: 166196
2012-10-18 18:06:48 +00:00
Nadav Rotem
f1bbc20bb0 When looking for a vector representation of a scalar, do a single lookup. Also, cache the result of the broadcast instruction.
No functionality change.

llvm-svn: 166191
2012-10-18 17:31:49 +00:00
Chad Rosier
72377848a3 [ms-inline asm] Move most of the AsmParsing logic in clang back into the MC
layer.  Add the ParseMSInlineAsm() function, which is the new interface to 
clang.  Also expose the new MCAsmParserSemaCallback interface, which is used
by the back-end to do name lookup in Sema.  Finally, remove the now defunct
APIs introduced in r165946.

llvm-svn: 166183
2012-10-18 15:49:34 +00:00
Ulrich Weigand
2248bca601 This patch fixes failures in the SingleSource/Regression/C/uint64_to_float
test case on PowerPC caused by rounding errors when converting from a 64-bit
integer to a single-precision floating point. The reason for this are
double-rounding effects, since on PowerPC we have to convert to an
intermediate double-precision value first, which gets rounded to the
final single-precision result.

The patch fixes the problem by preparing the 64-bit integer so that the
first conversion step to double-precision will always be exact, and the
final rounding step will result in the correctly-rounded single-precision
result.  The generated code sequence is equivalent to what GCC would generate.

When -enable-unsafe-fp-math is in effect, that extra effort is omitted
and we accept possible rounding errors (just like GCC does as well).

llvm-svn: 166178
2012-10-18 13:16:11 +00:00
Chandler Carruth
d7930e6205 Refactor insert and extract of sub-integers into static helpers that
operate purely on values. Sink the alloca loading and storing logic into
the rewrite routines that are specific to alloca-integer-rewrite
driving. This is just a refactoring here, but the subsequent step will
be to reuse the insertion and extraction logic when rewriting integer
loads and stores that have been split and decomposed into narrower loads
and stores.

No functionality changed other than different names for instructions.

llvm-svn: 166176
2012-10-18 09:56:08 +00:00
Chandler Carruth
b0b1a55418 This FIXME was fixed some time ago. =]
llvm-svn: 166175
2012-10-18 09:56:06 +00:00
Chandler Carruth
7bfc26a7b4 Introduce a BarrierNoop pass, a hack designed to allow *some* control
over the implicitly-formed-and-nesting CGSCC pass manager and function
pass managers, especially when using them on the opt commandline or
using extension points in the module builder. The '-barrier' opt flag
(or the pass itself) will create a no-op module pass in the pipeline,
resetting the pass manager stack, and allowing the creation of a new
pipeline of function passes or CGSCC passes to be created that is
independent from any previous pipelines.

For example, this can be used to test running two CGSCC passes in
independent CGSCC pass managers as opposed to in the same CGSCC pass
manager. It also allows us to introduce a further hack into the
PassManagerBuilder to separate the O0 pipeline extension passes from the
always-inliner's CGSCC pass manager, which they likely do not want to
participate in... At the very least none of the Sanitizer passes want
this behavior.

This fixes a bug with ASan at O0 currently, and I'll commit the ASan
test which covers this pass. I'm happy to add a test case that this pass
exists and works, but not sure how much time folks would like me to
spend adding test cases for the details of its behavior of partition
pass managers.... The whole thing is just vile, and mostly intended to
unblock ASan, so I'm hoping to rip this all out in a brave new pass
manager world.

llvm-svn: 166172
2012-10-18 08:05:46 +00:00
Nadav Rotem
76ff018e87 remove unused variable to fix a warning.
llvm-svn: 166170
2012-10-18 06:09:21 +00:00
Nadav Rotem
7293669878 Add a small example which shows a vectorizable loop with a non-pow-of-two count
llvm-svn: 166169
2012-10-18 05:46:16 +00:00
Bob Wilson
b6adb70bdd Temporarily revert the TargetTransform changes.
The TargetTransform changes are breaking LTO bootstraps of clang.  I am
working with Nadav to figure out the problem, but I am reverting it for now
to get our buildbots working.

This reverts svn commits: 165665 165669 165670 165786 165787 165997
and I have also reverted clang svn 165741

llvm-svn: 166168
2012-10-18 05:43:52 +00:00
Nadav Rotem
67e1c2c770 Remove the use of dominators and AA.
llvm-svn: 166167
2012-10-18 05:33:02 +00:00
Nadav Rotem
fd924ec3c6 Vectorizer: Add support for loops with an unknown count. For example:
for (i=0; i<n; i++){
        a[i] = b[i+1] + c[i+3];
     }

llvm-svn: 166165
2012-10-18 05:29:12 +00:00
Bill Wendling
1c85e8a3f4 Revert r166157 because some tests fail...
llvm-svn: 166159
2012-10-17 23:56:05 +00:00
Bill Wendling
7f20eaeb70 Check that the operand of the GEP is not the GEP itself. This occurred during an LTO build of LLVM.
llvm-svn: 166157
2012-10-17 23:54:19 +00:00
Michael Liao
f58d16a933 Revert part of r166049 back and enable test case in r166125.
- Folding (trunc (concat ... X )) to (concat ... (trunc X) ...) is valid
  when '...' are all 'undef's.
- r166125 relies on this transformation.

llvm-svn: 166155
2012-10-17 23:45:54 +00:00
NAKAMURA Takumi
8ffefaa778 LoopVectorize.cpp: Fix a warning. [-Wunused-variable]
llvm-svn: 166153
2012-10-17 23:40:15 +00:00
Michael Liao
1feff8ece7 Disable extract-concat test case temporarily
llvm-svn: 166141
2012-10-17 23:08:19 +00:00
Jakub Staszak
f66a4adca8 Remove redundant SetInsertPoint call.
llvm-svn: 166138
2012-10-17 23:06:37 +00:00
Michael Liao
3accf514d6 Revert r166049
- In general, it's unsafe for this transformation.

llvm-svn: 166135
2012-10-17 22:41:15 +00:00
Reed Kotler
9a7c7a004d Add conditional branch instructions and their patterns.
llvm-svn: 166134
2012-10-17 22:29:54 +00:00
Roman Divacky
e9f1f9a823 Fix some typos and wrong indenting.
llvm-svn: 166128
2012-10-17 21:07:35 +00:00
Michael Liao
b168cd6995 Teach DAG combine to fold (extract_subvec (concat v1, ..) i) to v_i
- If the extracted vector has the same type of all vectored being concatenated
  together, it should be simplified directly into v_i, where i is the index of
  the element being extracted.

llvm-svn: 166125
2012-10-17 20:48:33 +00:00
Jakob Stoklund Olesen
1eec126712 Switch MRI::UsedPhysRegs to a register unit bit vector.
This is a more compact, less redundant representation, and it avoids
scanning long lists of aliases for ARM D-registers, for example.

llvm-svn: 166124
2012-10-17 20:26:33 +00:00
Nadav Rotem
574696a0dd Update the release notes about how to enable the loop vectorizer.
llvm-svn: 166123
2012-10-17 19:49:21 +00:00
Evan Cheng
b5e95007fe Add a really faster pre-RA scheduler (-pre-RA-sched=linearize). It doesn't use
any scheduling heuristics nor does it build up any scheduling data structure
that other heuristics use. It essentially linearize by doing a DFA walk but
it does handle glues correctly.

IMPORTANT: it probably can't handle all the physical register dependencies so
it's not suitable for x86. It also doesn't deal with dbg_value nodes right now
so it's definitely is still WIP.

rdar://12474515

llvm-svn: 166122
2012-10-17 19:39:36 +00:00
Jakob Stoklund Olesen
19bfbc3745 Merge MRI::isPhysRegOrOverlapUsed() into isPhysRegUsed().
All callers of these functions really want the isPhysRegOrOverlapUsed()
functionality which also checks aliases. For historical reasons, targets
without register aliases were calling isPhysRegUsed() instead.

Change isPhysRegUsed() to also check aliases, and switch all
isPhysRegOrOverlapUsed() callers to isPhysRegUsed().

llvm-svn: 166117
2012-10-17 18:44:18 +00:00
Nadav Rotem
a2f8199a1f Update the release notes about the store-merge dag optimization.
llvm-svn: 166116
2012-10-17 18:35:21 +00:00