1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

51656 Commits

Author SHA1 Message Date
NAKAMURA Takumi
666c0dd00f Target/Hexagon: Fix CMake build. We don't use add_llvm_library_dependencies().
llvm-svn: 146457
2011-12-13 00:36:04 +00:00
Chad Rosier
37852d85ad [fast-isel] Guard "exhastive" fast-isel output with -fast-isel-verbose2.
llvm-svn: 146453
2011-12-13 00:05:11 +00:00
Chad Rosier
cfc5cc5be4 Add BitcodeVerifier.cpp to CMakeList.
llvm-svn: 146442
2011-12-12 23:11:26 +00:00
Nick Lewycky
e21bd35d14 Fix unused value warning for value used only in assert.
llvm-svn: 146440
2011-12-12 22:59:34 +00:00
Chad Rosier
bdf3ba2207 Begin sketching out a bitcode verifier pass. Idea is to emit a .bc file and
then read the file back in to verify use-list serialization/deserialization.

llvm-svn: 146439
2011-12-12 22:57:31 +00:00
Andrew Trick
67432b451b Indvars: guard against exponential behavior in isHighCostExpansion.
This should always be done as a matter of principal. I don't have a
case that exposes the problem. I just noticed this recently while
scanning the code and realized I meant to fix it long ago.

llvm-svn: 146438
2011-12-12 22:46:16 +00:00
Daniel Dunbar
b72534060e LLVMBuild: Introduce a common section which currently has a list of the
subdirectories to traverse into.
 - Originally I wanted to avoid this and just autoscan, but this has one key
   flaw in that new subdirectories can not automatically trigger a rerun of the
   llvm-build tool. This is particularly a pain when switching back and forth
   between trees where one has added a subdirectory, as the dependencies will
   tend to be wrong. This will also eliminates FIXME implicitly.

llvm-svn: 146436
2011-12-12 22:45:54 +00:00
Akira Hatanaka
b091e73672 Emit B (unconditional branch) when -relocation-model=pic and J (jump) when
-relocation-model=static.

llvm-svn: 146432
2011-12-12 22:39:35 +00:00
Akira Hatanaka
6530764264 Fix indentation.
llvm-svn: 146431
2011-12-12 22:38:19 +00:00
Pete Cooper
2675c6f8b3 Fixed register allocator splitting a live range on a spilling variable.
If we create new intervals for a variable that is being spilled, then those new intervals are not guaranteed to also spill.  This means that anything reading from the original spilling value might not get the correct value if spills were missed.

Fixes <rdar://problem/10546864>

llvm-svn: 146428
2011-12-12 22:16:27 +00:00
Tony Linthicum
e3cdb7e336 fix warning
llvm-svn: 146420
2011-12-12 21:52:59 +00:00
Bob Wilson
70f6f24d68 Implement 'e' and 'f' modifiers for Neon inline asm. <rdar://problem/10551006>
These modifiers simply select either the low or high D subregister of a Neon
Q register.  I've also removed the unimplemented 'p' modifier, which turns out
to be a bit different than the comment here suggests and as far as I can tell
was only intended for internal use in Apple's version of gcc.

llvm-svn: 146417
2011-12-12 21:45:15 +00:00
Tony Linthicum
61adbf8dc5 Hexagon backend support
llvm-svn: 146412
2011-12-12 21:14:40 +00:00
Joerg Sonnenberger
5b25b4d437 Only replace fwrite with fputc, if the return value is unused.
llvm-svn: 146411
2011-12-12 20:18:31 +00:00
Daniel Dunbar
30d6a45140 LLVMBuild: Remove trailing newline, which irked me.
llvm-svn: 146409
2011-12-12 19:48:00 +00:00
Dan Gohman
40acf5d720 When computing reverse-CFG reverse-post-order, skip backedges, as
detected in the forward-CFG DFS. This prevents the reverse-CFG from
visiting blocks inside loops after blocks that dominate them in the
case where loops have multiple exits.

No testcase, because this fixes a bug which in practice only shows
up in a full optimizer run, due to the use-list order.

This fixes rdar://10422791 and others.

llvm-svn: 146408
2011-12-12 19:42:25 +00:00
Jan Sjödin
b9e2da0d9a XOP instructions and encoding tests.
llvm-svn: 146407
2011-12-12 19:37:49 +00:00
Jakob Stoklund Olesen
f9a9db0d62 Add a postOffset() alignment argument.
This computes the offset of the layout sucessor block, considering its
alignment as well.

llvm-svn: 146401
2011-12-12 19:25:54 +00:00
Jakob Stoklund Olesen
95050edc56 Fix typo.
llvm-svn: 146400
2011-12-12 19:25:51 +00:00
Jan Sjödin
b4602e048f XOP encoding bits and logic.
llvm-svn: 146397
2011-12-12 19:12:26 +00:00
Jakob Stoklund Olesen
df04f809f4 Also set the proper alignment on inner islands and the function itself.
Downgrade the alignment of the initial constant island when constant
pool entries are moved elsewhere.

This is all gated by -arm-align-constant-islands.

llvm-svn: 146391
2011-12-12 18:45:45 +00:00
Dan Gohman
73c245acaa Add a TODO comment.
llvm-svn: 146389
2011-12-12 18:30:26 +00:00
Dan Gohman
9144e6bb3e Fix a copy+pasto in a comment.
llvm-svn: 146385
2011-12-12 18:20:00 +00:00
Dan Gohman
ee8b344c67 Use getArgOperand instead of getOperand on a call.
llvm-svn: 146384
2011-12-12 18:19:12 +00:00
Dan Gohman
61f78d27b0 Inline SetSeqToRelease into its only caller, since it's more clear that way.
llvm-svn: 146383
2011-12-12 18:16:56 +00:00
Jakob Stoklund Olesen
3b2cfb38e1 Make MF a class member instead of passing it around everywhere.
Also add an MCP member pointing to the machine constant pool.

No functional change intended.

llvm-svn: 146382
2011-12-12 18:16:53 +00:00
Dan Gohman
3ebb9f4498 Fix omitted break statements in a switch.
llvm-svn: 146380
2011-12-12 18:13:53 +00:00
Kostya Serebryany
da73ce34a1 [asan] use .preinit_array only on linux
llvm-svn: 146379
2011-12-12 18:01:46 +00:00
Chad Rosier
dc87aebd3c Revert r146363 to allow buildbots to make forward progress.
Original commit message:
Support/FileSystem: Implement canonicalize.

llvm-svn: 146378
2011-12-12 17:58:31 +00:00
Roman Divacky
a450b8b2c8 Add support for gnu_indirect_function.
llvm-svn: 146377
2011-12-12 17:34:04 +00:00
Jakob Stoklund Olesen
c3280867bc Add a -arm-align-constant-islands flag, default off.
Order constant pool entries by descending alignment in the initial
island to ensure packing and correct alignment.  When the command line
flag is set, also align the basic block containing the constant pool
entries.

This is only a partial implementation of constant island alignment. More
to come.

llvm-svn: 146375
2011-12-12 16:49:37 +00:00
Chandler Carruth
ed68325a38 Don't rely in there being one argument before we've actually identified
a function to upgrade. Also, simplify the code a bit at the expense of
one line.

llvm-svn: 146368
2011-12-12 10:57:20 +00:00
Michael J. Spencer
b6d86d4978 Support/FileSystem: Implement bool equivalent(file_status A, file_status B);
llvm-svn: 146364
2011-12-12 06:04:28 +00:00
Michael J. Spencer
fd161c5276 Support/FileSystem: Implement canonicalize.
llvm-svn: 146363
2011-12-12 06:04:01 +00:00
Michael J. Spencer
88c9342c25 Support/Windows: Cleanup scoped handles.
llvm-svn: 146362
2011-12-12 06:03:33 +00:00
Chandler Carruth
d733f059d0 Teach the verifier to reject all non-constant arguments to the second
argument of the cttz and ctlz intrinsics.

llvm-svn: 146360
2011-12-12 04:36:02 +00:00
Chandler Carruth
083a91fab1 Switch llvm.cttz and llvm.ctlz to accept a second i1 parameter which
indicates whether the intrinsic has a defined result for a first
argument equal to zero. This will eventually allow these intrinsics to
accurately model the semantics of GCC's __builtin_ctz and __builtin_clz
and the X86 instructions (prior to AVX) which implement them.

This patch merely sets the stage by extending the signature of these
intrinsics and establishing auto-upgrade logic so that the old spelling
still works both in IR and in bitcode. The upgrade logic preserves the
existing (inefficient) semantics. This patch should not change any
behavior. CodeGen isn't updated because it can use the existing
semantics regardless of the flag's value.

Note that this will be followed by API updates to Clang and DragonEgg.

Reviewed by Nick Lewycky!

llvm-svn: 146357
2011-12-12 04:26:04 +00:00
Dylan Noblesmith
0cb8d6819b ExecutionEngine: refactor interface
The OptLevel is now redundant with the TargetMachine*.
And selectTarget() isn't really JIT-specific and could probably
get refactored into one of the lower level libraries.

llvm-svn: 146355
2011-12-12 04:20:36 +00:00
Craig Topper
1e13feed8c Remove some remants of the old palign pattern fragment that were still hanging around. Also remove a cast from inside getShuffleVPERM2X128Immediate and getShuffleVPERMILPImmediate since the only caller already had done the cast.
llvm-svn: 146344
2011-12-11 19:12:35 +00:00
Stepan Dyatkovskiy
bf1423bdcd Fixed bug 9905: Failure in code selection for llvm intrinsics sqrt/exp (fix for FSQRT, FSIN, FCOS, FPOWI, FPOW, FLOG, FLOG2, FLOG10, FEXP, FEXP2). Third attempt: simplified checks in test for armv7-apple-darwin11.
llvm-svn: 146341
2011-12-11 14:35:48 +00:00
Benjamin Kramer
263c777e81 Mips: Don't create a dangling IR function just to get the address of a symbol.
llvm-svn: 146340
2011-12-11 12:21:34 +00:00
Nick Lewycky
3e93bb877c Also remove unnecessary includes from this file, which was supposed to be part
of r146334!

llvm-svn: 146338
2011-12-11 00:45:13 +00:00
Nick Lewycky
03325a99c6 Minimize #include's and forward-declares in Target.
llvm-svn: 146335
2011-12-10 22:35:47 +00:00
Nick Lewycky
b3d0d07fba Refactor the implementation of the TargetOptions out of TargetMachine, taking
the only parts of TM that depends on CodeGen headers with it.

llvm-svn: 146334
2011-12-10 22:34:41 +00:00
Chad Rosier
2cf6a76fd4 [fast-isel] SelectInsertValue seems to be causing miscompiles for ARM. Disable while I investigate.
llvm-svn: 146331
2011-12-10 21:27:40 +00:00
Chad Rosier
d8a265c838 Revert r146322 to appease buildbots. Original commit message:
Fixed bug 9905: Failure in code selection for llvm intrinsics sqrt/exp (fix for
FSQRT, FSIN, FCOS, FPOWI, FPOW, FLOG, FLOG2, FLOG10, FEXP, FEXP2). Second
attempt.

llvm-svn: 146328
2011-12-10 19:55:03 +00:00
Chad Rosier
fa991ed762 Typo.
llvm-svn: 146327
2011-12-10 19:48:51 +00:00
Stepan Dyatkovskiy
5b2b42e8c9 Fixed bug 9905: Failure in code selection for llvm intrinsics sqrt/exp (fix for FSQRT, FSIN, FCOS, FPOWI, FPOW, FLOG, FLOG2, FLOG10, FEXP, FEXP2). Second attempt.
llvm-svn: 146322
2011-12-10 08:42:24 +00:00
Hal Finkel
d591c94df7 Make CR spill and restore use a reserved register. These operations cannot use the register scavenger because the scavenger can only scavenge one register and frame-index elimination may have already grabbed it.
llvm-svn: 146318
2011-12-10 04:50:53 +00:00
Jakob Stoklund Olesen
8c75d72739 Try to align the point where a large basic block is split.
The split point is picked such that the newly created water has the same
alignment as the function. This makes the island suitable for constant
pool entries with potentially higher alignment.

This also fixes an issue where the basic block was split one instruction
too late, causing nonconvergence of the algorithm.

<rdar://problem/10550705>

There is still an issue with correctly packing differently aligned
entries in the island.

llvm-svn: 146314
2011-12-10 02:55:10 +00:00