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

34344 Commits

Author SHA1 Message Date
Jim Grosbach
266c2d59e6 Thumb2 atomic operations
llvm-svn: 91321
2009-12-14 20:14:59 +00:00
Dan Gohman
d16b19ff3e Move several function bodies which are rarely inlined out of line.
llvm-svn: 91319
2009-12-14 19:43:09 +00:00
Chris Lattner
81c6d73285 fix an obvious bug found by clang++ and collapse a redundant if.
Here's the diagnostic from clang:

/Volumes/Data/dgregor/Projects/llvm/lib/Target/CppBackend/CPPBackend.cpp:989:23: warning: 'gv' is always NULL in this context
        printConstant(gv);
                      ^
1 diagnostic generated.

llvm-svn: 91318
2009-12-14 19:34:32 +00:00
Dan Gohman
8e0956f734 Micro-optimize these functions in the case where they are not inlined.
llvm-svn: 91316
2009-12-14 19:32:31 +00:00
Jim Grosbach
c7285dc721 correct selection requirements for thumb2 vs. arm versions of the barrier intrinsics
llvm-svn: 91313
2009-12-14 19:24:11 +00:00
Jim Grosbach
723a7aa4e9 add Thumb2 atomic and memory barrier instruction definitions
llvm-svn: 91310
2009-12-14 18:56:47 +00:00
Jim Grosbach
99ace7c9ff whitespace
llvm-svn: 91307
2009-12-14 18:36:32 +00:00
Jim Grosbach
aaf39891f4 ARM memory barrier instructions are not predicable
llvm-svn: 91305
2009-12-14 18:31:20 +00:00
Dan Gohman
106fce040d Clear the Processed set when it is no longer used, and clear the
IVUses list in releaseMemory().

llvm-svn: 91296
2009-12-14 17:35:17 +00:00
Dan Gohman
abb2ea84d9 Fix a thinko; isNotAlreadyContainedIn had a built-in negative, so the
condition was inverted when the code was converted to contains().

llvm-svn: 91295
2009-12-14 17:31:01 +00:00
Dan Gohman
ea5d4d2354 Remove unnecessary #includes.
llvm-svn: 91293
2009-12-14 17:19:06 +00:00
Dan Gohman
5066c25e62 Instead of having a ScalarEvolution pointer member in BasedUser, just pass
the ScalarEvolution pointer into the functions which need it.

llvm-svn: 91289
2009-12-14 17:12:51 +00:00
Dan Gohman
b001599b67 Don't bother cleaning up if there's nothing to clean up.
llvm-svn: 91288
2009-12-14 17:10:44 +00:00
Dan Gohman
178e26adbf Delete an unused variable.
llvm-svn: 91287
2009-12-14 17:08:09 +00:00
Dan Gohman
c6a7652b5e Drop Loop::isNotAlreadyContainedIn in favor of Loop::contains. The
former was just exposing a LoopInfoBase implementation detail.

llvm-svn: 91286
2009-12-14 17:06:50 +00:00
Jim Grosbach
5741d33c74 add ldrexd/strexd instructions
llvm-svn: 91284
2009-12-14 17:02:55 +00:00
Dan Gohman
44a2a502f2 LSR itself doesn't need LoopInfo.
llvm-svn: 91283
2009-12-14 17:02:34 +00:00
Dan Gohman
449298eb08 LSR itself doesn't need DominatorTree.
llvm-svn: 91282
2009-12-14 16:57:08 +00:00
Dan Gohman
bf3406f85f Remove the code in LSR that manually hoists expansions out of loops;
SCEVExpander does this automatically.

llvm-svn: 91281
2009-12-14 16:52:55 +00:00
Dan Gohman
0a0423c492 Minor code cleanups.
llvm-svn: 91280
2009-12-14 16:37:29 +00:00
Devang Patel
101a4bdd4a Use DW_AT_specification to point to DIE describing function declaration.
llvm-svn: 91278
2009-12-14 16:18:45 +00:00
Torok Edwin
388463f7c4 Add "generic" fallback.
gcc warned that the function may not have a return value, indeed
for non-intel and non-amd X86 CPUs it is right (VIA, etc.).

llvm-svn: 91276
2009-12-14 12:38:18 +00:00
Lang Hames
1266cbda54 Added CalcSpillWeights to CMakeLists.
llvm-svn: 91275
2009-12-14 07:43:25 +00:00
Bill Wendling
e4328758f9 Whitespace changes, comment clarification. No functional changes.
llvm-svn: 91274
2009-12-14 06:51:19 +00:00
Lang Hames
9b6e6492ad Moved spill weight calculation out of SimpleRegisterCoalescing and into its own pass: CalculateSpillWeights.
llvm-svn: 91273
2009-12-14 06:49:42 +00:00
Chris Lattner
6603d21f13 revert r91184, because it causes a crash on a .bc file I just
sent to Bob.

llvm-svn: 91268
2009-12-14 05:11:02 +00:00
Jim Grosbach
87975f6229 atomic binary operations up to 32-bits wide.
llvm-svn: 91260
2009-12-14 04:22:04 +00:00
Jeffrey Yasskin
d06c7e46a2 Reinstate r91208 to fix available_externally linkage for globals, with
nlewycky's fix to add -rdynamic so the JIT can look symbols up in Linux builds
of the JITTests binary.

llvm-svn: 91250
2009-12-13 20:30:32 +00:00
Torok Edwin
57fe66cf5b Using _MSC_VER there was wrong, better just use the already existing ifdefs for
x86 CPU detection for the X86 getHostCPUName too, and create a simple
getHostCPUName that returns "generic" for all else.

llvm-svn: 91240
2009-12-13 08:59:40 +00:00
Chandler Carruth
f5a2d328af Don't leave pointers uninitialized in the default constructor. GCC complains
about the potential use of these uninitialized members under certain conditions.

llvm-svn: 91239
2009-12-13 07:04:45 +00:00
Anton Korobeynikov
5236d41ee7 Fix weird typo which leads to unallocated memory access for nodes with 4 results.
llvm-svn: 91233
2009-12-13 01:00:59 +00:00
Anton Korobeynikov
fddfe4d096 Do not allow uninitialize access during debug printing
llvm-svn: 91232
2009-12-13 01:00:32 +00:00
Eli Friedman
392adbdd7d More info on this transformation.
llvm-svn: 91230
2009-12-12 23:23:43 +00:00
Eli Friedman
38a7d3b32e Remove some stuff that's already implemented. Also, remove the note about
merging x >u 5 and x <s 20 because it's impossible to implement.

llvm-svn: 91228
2009-12-12 21:41:48 +00:00
Evan Cheng
ee5b5917fd Disable r91104 for x86. It causes partial register stall which pessimize code in 32-bit.
llvm-svn: 91223
2009-12-12 20:03:14 +00:00
Anton Korobeynikov
5cd169e17e Implement variable-width shifts.
No testcase yet - it seems we're exposing generic codegen bugs.

llvm-svn: 91221
2009-12-12 18:55:37 +00:00
Evan Cheng
5cd8cd2a5c Add comment about potential partial register stall.
llvm-svn: 91220
2009-12-12 18:55:26 +00:00
Evan Cheng
53e863f152 Fix an obvious bug. No test case since LEA16r is not being used.
llvm-svn: 91219
2009-12-12 18:51:56 +00:00
Torok Edwin
6c46ee4a5b Enable CPU detection when using MS VS 2k8 too.
MSVS2k8 doesn't define __i386__, hence all the CPU detection code was disabled.
Enable it by looking for _MSC_VER.

llvm-svn: 91217
2009-12-12 12:42:31 +00:00
Jeffrey Yasskin
f79c7c85f7 Revert r91208. Something on Linux prevents the JIT from looking up a symbol
defined in the test, and I don't have time tonight to figure it out.

llvm-svn: 91209
2009-12-12 06:18:46 +00:00
Jeffrey Yasskin
b34198b7ff Fix available_externally linkage for globals. It's probably still not
supported by emitGlobals, but I don't have a test case for that.

llvm-svn: 91208
2009-12-12 05:58:14 +00:00
Jim Grosbach
187ad02a4f Framework for atomic binary operations. The emitter for the pseudo instructions
just issues an error for the moment. The front end won't yet generate these
intrinsics for ARM, so this is behind the scenes until complete.

llvm-svn: 91200
2009-12-12 01:40:06 +00:00
Bob Wilson
8486cae4ce Revise scalar replacement to be more flexible about handle bitcasts and GEPs.
While scanning through the uses of an alloca, keep track of the current offset
relative to the start of the alloca, and check memory references to see if
the offset & size correspond to a component within the alloca.  This has the
nice benefit of unifying much of the code from isSafeUseOfAllocation,
isSafeElementUse, and isSafeUseOfBitCastedAllocation.  The code to rewrite
the uses of a promoted alloca, after it is determined to be safe, is
reorganized in the same way.

Also, when rewriting GEP instructions, mark them as "in-bounds" since all the
indices are known to be safe.

llvm-svn: 91184
2009-12-11 23:47:40 +00:00
Dan Gohman
512052fbf2 Delete an unnecessary line. The VTSDNode on a SIGN_EXTEND_REG is never
a vector type.

llvm-svn: 91181
2009-12-11 23:26:08 +00:00
Anton Korobeynikov
724c82337f Lower setcc branchless, if this is profitable.
Based on the patch by Brian Lucas!

llvm-svn: 91175
2009-12-11 23:01:29 +00:00
Bill Wendling
10e315eae4 Don't try to move a MBB into the fall-through position if it's a landing pad or
branches only to a landing pad. Without this check, the compiler would go into
an infinite loop because the branch to a landing pad is an "abnormal" edge which
wasn't being taken into account.

This is the meat of that fix:

  if (!PrevBB.canFallThrough() && !MBB->BranchesToLandingPad(MBB)) {

The other stuff is simplification of the "branches to a landing pad" code.

llvm-svn: 91161
2009-12-11 21:47:36 +00:00
Devang Patel
888cd4aa89 Construct CompileUnits lazily.
llvm-svn: 91159
2009-12-11 21:37:07 +00:00
Dan Gohman
2e616e859b Implement vector widening, splitting, and scalarizing for SIGN_EXTEND_INREG.
llvm-svn: 91158
2009-12-11 21:31:27 +00:00
Jim Grosbach
0cfc544e97 memory barrier instructions by definition have side effects. This prevents the post-RA scheduler from moving them around.
llvm-svn: 91150
2009-12-11 20:29:53 +00:00
Dan Gohman
c22d542754 Make getUniqueExitBlocks's precondition assert more precise, to
avoid spurious failures. This fixes PR5758.

llvm-svn: 91147
2009-12-11 20:05:23 +00:00