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

85963 Commits

Author SHA1 Message Date
David Blaikie
5066b7681f Add dependency on llvm-bcanalyzer from tests to the CMake build.
This fixes a CMake build break introduced by r165739.

Thanks Jan Voung for the quick suggestion/fix.

llvm-svn: 165978
2012-10-15 21:11:46 +00:00
Bill Wendling
7a89835ee4 Move the Attributes::Builder outside of the Attributes class and into its own class named AttrBuilder. No functionality change.
llvm-svn: 165960
2012-10-15 20:35:56 +00:00
Andrew Trick
a3ebac4349 Check output of the misched unit tests
llvm-svn: 165959
2012-10-15 20:33:14 +00:00
Bill Wendling
ab9bf1a83b Add comments.
llvm-svn: 165958
2012-10-15 19:58:25 +00:00
Rafael Espindola
e152eedf59 Add a cpu to try to fix the atom builder.
llvm-svn: 165956
2012-10-15 19:25:43 +00:00
Chad Rosier
860153bf6d [ms-inline asm] If we parsed a statement and the opcode is valid, then it's an instruction.
llvm-svn: 165955
2012-10-15 19:08:18 +00:00
Rafael Espindola
e554bb55b6 Add testcase for pr14088.
llvm-svn: 165954
2012-10-15 19:00:10 +00:00
Andrew Trick
252355ac40 misched tests: add a triple to speculatively fix windows builders.
llvm-svn: 165952
2012-10-15 18:21:08 +00:00
Rafael Espindola
03c701aad3 Make sure we iterate over newly created instructions. Fixes pr13625. Testcase to
follow in one sec.

llvm-svn: 165951
2012-10-15 18:21:07 +00:00
Andrew Trick
a5e2aeb12b misched: ILP scheduler for experimental heuristics.
llvm-svn: 165950
2012-10-15 18:02:27 +00:00
Chad Rosier
d95d1262b9 [ms-inline asm] Update the end loc for ParseIntelMemOperand.
llvm-svn: 165947
2012-10-15 17:26:38 +00:00
Chad Rosier
77614bbd0e [ms-inline asm] Add a few new APIs to the AsmParser class in support of MS-Style
inline assembly.  For the time being, these will be called directly by clang.
However, in the near future I expect these to be sunk back into the MC layer
and more basic APIs (e.g., getClobbers(), getConstraints(), etc.) will be called
by clang.

llvm-svn: 165946
2012-10-15 17:19:13 +00:00
Chad Rosier
aeec5a1023 [ms-inline asm] Use incoming argument rather than hard coding to false.
llvm-svn: 165945
2012-10-15 16:50:34 +00:00
Jan Wen Voung
b1bdc84698 Fix a typo in bitcode docs, from 165814.
llvm-svn: 165944
2012-10-15 16:47:58 +00:00
Micah Villmow
272663afc2 Resubmit the changes to llvm core to update the functions to support different pointer sizes on a per address space basis.
llvm-svn: 165941
2012-10-15 16:24:29 +00:00
Adhemerval Zanella
ad392b0f93 PowerPC: add EmitTCEntry class for TOC creation
This patch replaces the EmitRawText by a EmitTCEntry class (specialized for
each Streamer) in PowerPC64 TOC entry creation.

llvm-svn: 165940
2012-10-15 15:43:14 +00:00
Kostya Serebryany
21702ac519 [asan] fix a test
llvm-svn: 165938
2012-10-15 14:30:30 +00:00
Kostya Serebryany
a6cd7ad8f2 [asan] make AddressSanitizer to be a FunctionPass instead of ModulePass. This will simplify chaining other FunctionPasses with asan. Also some minor cleanup
llvm-svn: 165936
2012-10-15 14:20:06 +00:00
Chandler Carruth
0659e10e8a Update the memcpy rewriting to fully support widened int rewriting. This
includes extracting ints for copying elsewhere and inserting ints when
copying into the alloca. This should fix the CanSROA assertion coming
out of Clang's regression test suite.

llvm-svn: 165931
2012-10-15 10:24:43 +00:00
Chandler Carruth
7755041393 Follow-up fix to r165928: handle memset rewriting for widened integers,
and generally clean up the memset handling. It had rotted a bit as the
other rewriting logic got polished more.

llvm-svn: 165930
2012-10-15 10:24:40 +00:00
Silviu Baranga
e3e0e84559 Fixed PR13938: the ARM backend was crashing because it couldn't select a VDUPLANE node with the vector input size different from the output size. This was bacause the BUILD_VECTOR lowering code didn't check that the size of the input vector was correct for using VDUPLANE.
llvm-svn: 165929
2012-10-15 09:41:32 +00:00
Chandler Carruth
65613836e9 First major step toward addressing PR14059. This teaches SROA to handle
cases where we have partial integer loads and stores to an otherwise
promotable alloca to widen[1] those loads and stores to cover the entire
alloca and bitcast them into the appropriate type such that promotion
can proceed.

These partial loads and stores stem from an annoying confluence of ARM's
calling convention and ABI lowering and the FCA pre-splitting which
takes place in SROA. Clang lowers a { double, double } in-register
function argument as a [4 x i32] function argument to ensure it is
placed into integer 32-bit registers (a really unnerving implicit
contract between Clang and the ARM backend I would add). This results in
a FCA load of [4 x i32]* from the { double, double } alloca, and SROA
decomposes this into a sequence of i32 loads and stores. Inlining
proceeds, code gets folded, but at the end of the day, we still have i32
stores to the low and high halves of a double alloca. Widening these to
be i64 operations, and bitcasting them to double prior to loading or
storing allows promotion to proceed for these allocas.

I looked quite a bit changing the IR which Clang produces for this case
to be more friendly, but small changes seem unlikely to help. I think
the best representation we could use currently would be to pass 4 i32
arguments thereby avoiding any FCAs, but that would still require this
fix. It seems like it might eventually be nice to somehow encode the ABI
register selection choices outside of the parameter type system so that
the parameter can be a { double, double }, but the CC register
annotations indicate that this should be passed via 4 integer registers.

This patch does not address the second problem in PR14059, which is the
reverse: when a struct alloca is loaded as a *larger* single integer.

This patch also does not address some of the code quality issues with
the FCA-splitting. Those don't actually impede any optimizations really,
but they're on my list to clean up.

[1]: Pedantic footnote: for those concerned about memory model issues
here, this is safe. For the alloca to be promotable, it cannot escape or
have any use of its address that could allow these loads or stores to be
racing. Thus, widening is always safe.

llvm-svn: 165928
2012-10-15 08:40:30 +00:00
Chandler Carruth
8b8a99cfa9 Hoist the canConvertValue predicate and the convertValue transform out
into static helper functions. They're really quite generic and are going
to be needed elsewhere shortly.

llvm-svn: 165927
2012-10-15 08:40:22 +00:00
Bill Wendling
f2fff93263 Add an enum for the return and function indexes into the AttrListPtr object. This gets rid of some magic numbers.
llvm-svn: 165924
2012-10-15 07:29:08 +00:00
Bill Wendling
5fb56f15bd Use a ::get method to create the attribute from Attributes::AttrVals instead of a constructor.
llvm-svn: 165923
2012-10-15 06:53:28 +00:00
Bill Wendling
71e3fa6c01 Supply a default 'operator=' method.
llvm-svn: 165922
2012-10-15 06:34:18 +00:00
Bill Wendling
213dd167bc Move the AttributesImpl header file into the VMCore directory so that it can be opaque.
llvm-svn: 165920
2012-10-15 05:40:12 +00:00
Bill Wendling
a77399599d Attributes Rewrite
Convert the internal representation of the Attributes class into a pointer to an
opaque object that's uniqued by and stored in the LLVMContext object. The
Attributes class then becomes a thin wrapper around this opaque
object. Eventually, the internal representation will be expanded to include
attributes that represent code generation options, etc.

llvm-svn: 165917
2012-10-15 04:46:55 +00:00
Meador Inge
a24293f9d8 instcombine: Migrate strcmp and strncmp optimizations
This patch migrates the strcmp and strncmp optimizations from the
simplify-libcalls pass into the instcombine library call simplifier.

llvm-svn: 165915
2012-10-15 03:47:37 +00:00
Benjamin Kramer
e80e7ac945 Update CMake build.
llvm-svn: 165908
2012-10-14 16:06:09 +00:00
Benjamin Kramer
25522ac16c Fix a typo that made ImmutableMap::getMaxElement() useless.
Add a basic unit test for ImmutableMap. Found by inspection.

llvm-svn: 165907
2012-10-14 15:56:39 +00:00
Benjamin Kramer
4937fd3bbe Simplify code. No functionality change.
llvm-svn: 165904
2012-10-14 11:15:42 +00:00
Benjamin Kramer
7ad10379a1 Unquadratize SetVector removal loops in DSE.
Erasing from the beginning or middle of the vector is expensive, remove_if can
do it in linear time even though it's a bit ugly without lambdas.

No functionality change.

llvm-svn: 165903
2012-10-14 10:21:31 +00:00
Bill Wendling
3ce41738d8 Remove dead methods.
llvm-svn: 165902
2012-10-14 09:21:44 +00:00
Bill Wendling
ea777202df Remove operator cast method in favor of querying with the correct method.
llvm-svn: 165899
2012-10-14 08:54:26 +00:00
Benjamin Kramer
95200ba870 Fix use after free when deleting attributes in a chained folding set.
Can't follow the intrusive linked list when the element is gone.

llvm-svn: 165898
2012-10-14 08:48:40 +00:00
Bill Wendling
5ed900d026 Don't use the new syntax just yet.
llvm-svn: 165897
2012-10-14 08:25:35 +00:00
Bill Wendling
7005388897 Remove the bitwise AND operators from the Attributes class. Replace it with the equivalent from the builder class.
llvm-svn: 165896
2012-10-14 07:52:48 +00:00
Bill Wendling
03d1b8ef4c Remove the bitwise assignment OR operator from the Attributes class. Replace it with the equivalent from the builder class.
llvm-svn: 165895
2012-10-14 07:35:59 +00:00
Bill Wendling
c04d329902 Remove the bitwise OR operator from the Attributes class. Replace it with the equivalent from the builder class.
llvm-svn: 165894
2012-10-14 07:17:34 +00:00
Bill Wendling
ea1286d8bf Remove the bitwise XOR operator from the Attributes class. Replace it with the equivalent from the builder class.
llvm-svn: 165893
2012-10-14 06:56:13 +00:00
Bill Wendling
1dc6f7739b Remove the bitwise NOT operator from the Attributes class. Replace it with the equivalent from the builder class.
llvm-svn: 165892
2012-10-14 06:39:53 +00:00
Bill Wendling
2a54428ca9 Decode the LLVM attributes from bitcode using the attributes builder.
llvm-svn: 165891
2012-10-14 04:10:01 +00:00
Bill Wendling
5eda1106ff Use builder to create alignment attributes. Remove dead function.
llvm-svn: 165890
2012-10-14 03:58:29 +00:00
Bill Wendling
0bbe1f34e1 Remove dead method.
llvm-svn: 165889
2012-10-14 03:28:43 +00:00
Bill Wendling
e37f43db47 Don't pass in an Attributes object to something that expects an integral value.
llvm-svn: 165887
2012-10-14 03:27:15 +00:00
Benjamin Kramer
161580aadb Remove unused private field.
llvm-svn: 165881
2012-10-13 18:03:34 +00:00
Benjamin Kramer
1d2b1ffd35 X86: Depending on the local semantics of .align this test can also emit a nopl instead of nopw.
llvm-svn: 165880
2012-10-13 17:38:00 +00:00
Dmitri Gribenko
68a2e52f88 Documentation: Lexicon.rst: add "BB Vectorization" and "TBAA".
llvm-svn: 165879
2012-10-13 17:34:49 +00:00
Benjamin Kramer
80915069f7 X86: Disable long nops for all cpus prior to pentiumpro/i686.
llvm-svn: 165878
2012-10-13 17:28:35 +00:00