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

57433 Commits

Author SHA1 Message Date
Kostya Serebryany
b10cf5b902 [asan] use names of globals instead of an external set to distinguish the globals generated by asan
llvm-svn: 168368
2012-11-20 14:16:08 +00:00
Kostya Serebryany
278702663c [asan] don't instrument linker-initialized globals even with external linkage in -asan-initialization-order mode
llvm-svn: 168367
2012-11-20 13:11:32 +00:00
Kostya Serebryany
ae2ee8e3f1 [asan] make sure that linker-initialized globals (non-extern) are not instrumented even in -asan-initialization-order mode. This time with a test
llvm-svn: 168366
2012-11-20 13:00:01 +00:00
Chandler Carruth
6bdeed2384 Use LLVM_ENABLE_DUMP for the variables used in printing as well as the
printing functions themselves.

Part of PR14324 (which should have just been a patch to the list, but
hey...)

llvm-svn: 168362
2012-11-20 10:23:07 +00:00
Chandler Carruth
42df021931 Fix PR14132 and handle OOB loads speculated throuh PHI nodes.
The issue is that we may end up with newly OOB loads when speculating
a load into the predecessors of a PHI node, and this confuses the new
integer splitting logic in some cases, triggering an assertion failure.
In fact, the branch in question must be dead code as it loads from
a too-narrow alloca. Add code to handle this gracefully and leave the
requisite FIXMEs for both optimizing more aggressively and doing more to
aid sanitizing invalid code which triggers these patterns.

llvm-svn: 168361
2012-11-20 10:02:19 +00:00
Tim Northover
3556e52a02 Fix physical register liveness calculations:
+ Take account of clobbers
+ Give outputs priority over inputs since they happen later.

llvm-svn: 168360
2012-11-20 09:56:11 +00:00
Elena Demikhovsky
9f52a3ef84 Intel OCL built-ins calling conventions now support MacOS 32-bit.
llvm-svn: 168359
2012-11-20 09:37:57 +00:00
Bill Wendling
62a846033f Make the AttrListPtr object a part of the LLVMContext.
When code deletes the context, the AttributeImpls that the AttrListPtr points to
are now invalid. Therefore, instead of keeping a separate managed static for the
AttrListPtrs that's reference counted, move it into the LLVMContext and delete
it when deleting the AttributeImpls.

llvm-svn: 168354
2012-11-20 05:09:20 +00:00
Chandler Carruth
dbe3a57c30 Add a comment to associate a FIXME with a PR where it is matters.
llvm-svn: 168347
2012-11-20 01:27:48 +00:00
Chandler Carruth
47187cb94a Rework the rewriting of loads and stores for vector and integer allocas
to properly handle the combinations of these with split integer loads
and stores. This essentially replaces Evan's r168227 by refactoring the
code in a different way, and trynig to mirror that refactoring in both
the load and store sides of the rewriting.

Generally speaking there was some really problematic duplicated code
here that led to poorly founded assumptions and then subtle bugs. Now
much of the code actually flows through and follows a more consistent
style and logical path. There is still a tiny bit of duplication on the
store side of things, but it is much less bad.

This also changes the logic to never re-use a load or store instruction
as that was simply too error prone in practice.

I've added a few tests (one a reduction of the one in Evan's original
patch, which happened to be the same as the report in PR14349). I'm
going to look at adding a few more tests for things I found and fixed in
passing (such as the volatile tests in the vectorizable predicate).

This patch has survived bootstrap, and modulo one bugfix survived
Duncan's test suite, but let me know if anything else explodes.

llvm-svn: 168346
2012-11-20 01:12:50 +00:00
Eric Christopher
88ccedb94c 80-column and whitespace fixups.
llvm-svn: 168344
2012-11-20 00:15:36 +00:00
Sean Silva
e0e760dc93 Allow using MemoryBuffers with yaml::Stream directly.
The rationale is to get YAML filenames in diagnostics from
yaml::Stream::printError -- currently the filename is hard-coded as
"YAML" because there's no buffer information available.

Patch by Kim Gräsman!

llvm-svn: 168341
2012-11-19 23:21:47 +00:00
Eric Christopher
9c2055893d Remove a function argument and propagate const around accordingly.
llvm-svn: 168338
2012-11-19 22:42:15 +00:00
Eric Christopher
8955f8b0e2 Whitespace and 80-col.
llvm-svn: 168337
2012-11-19 22:42:10 +00:00
Anton Korobeynikov
63bdeb3368 Make AsmPrinter::EmitTTypeReference() more robust - put
the zero GV check inside, so we won't forget it at the caller side.

llvm-svn: 168328
2012-11-19 21:17:20 +00:00
Anton Korobeynikov
7a285e97e2 Factor out type info emission into separate routine.
It turned out that ARM wants different layout of type infos.
This is yet another patch in attempt to fix PR7187 

llvm-svn: 168325
2012-11-19 21:06:26 +00:00
Eric Christopher
c1acffcb61 Move section label emission to module end. Nothing should be
depending on them being emitted before the text and/or data
sections and testing didn't uncover any.

llvm-svn: 168321
2012-11-19 19:43:59 +00:00
Jakob Stoklund Olesen
42930d7c54 Handle mixed normal and early-clobber defs on inline asm.
PR14376.

llvm-svn: 168320
2012-11-19 19:31:10 +00:00
Joe Abbey
1872a71eb9 80 cols
llvm-svn: 168318
2012-11-19 19:22:55 +00:00
NAKAMURA Takumi
7652190f5b Promote the constant 1 to long long, 1LL or 1ULL in int64_t-sensitive context.
llvm-svn: 168304
2012-11-19 10:03:09 +00:00
Bob Wilson
bcc1a33cb5 Clean up handling of always-inline functions in the inliner.
This patch moves the isInlineViable function from the InlineAlways pass into
the InlineCostAnalyzer and then changes the InlineCost computation to use that
simple check for always-inline functions. All the special-case checks for
AlwaysInline in the CallAnalyzer can then go away.

llvm-svn: 168300
2012-11-19 07:04:35 +00:00
Bob Wilson
19b846be19 Some comment fixes.
llvm-svn: 168299
2012-11-19 07:04:30 +00:00
Craig Topper
c5148fc302 Move else onto line with preceding closing brace.
llvm-svn: 168294
2012-11-19 00:11:50 +00:00
Duncan Sands
666f7dee7a Remove the last bit of constant folding from LinearizeExprTree (most of it was
removed in commit 168035, but I missed this bit).

llvm-svn: 168292
2012-11-18 20:15:36 +00:00
Duncan Sands
2d43cbfea0 Fix PR14060, an infinite loop in reassociate. The problem was that one of the
operands of the expression being written was wrongly thought to be reusable as
an inner node of the expression resulting in it turning up as both an inner node
*and* a leaf, creating a cycle in the def-use graph.  This would have caused the
verifier to blow up if things had gotten that far, however it managed to provoke
an infinite loop first.

llvm-svn: 168291
2012-11-18 19:27:01 +00:00
Nick Lewycky
570e765264 Don't try to calculate the alignment of an unsigned type. Fixes PR14371!
llvm-svn: 168280
2012-11-18 05:39:39 +00:00
James Molloy
0915ec1560 Add a new function to ConstantExpr - getAsInstruction. This returns its Instruction* corollary, which may be useful if a user
wishes to transform a ConstantExpr so that one of its operands is no longer constant.

llvm-svn: 168262
2012-11-17 17:56:30 +00:00
Benjamin Kramer
5135d2223c Plug a memory leak in the GCOV profiling emitter, which never released the edge table memory.
llvm-svn: 168259
2012-11-17 13:49:37 +00:00
Andrew Trick
52f84ce773 Broaden isSchedulingBoundary to check aliases of SP.
On PPC the stack pointer is X1, but ADJCALLSTACK writes R1.

Fixes PR14315: Register regmask dependency problem with misched.

llvm-svn: 168248
2012-11-17 03:35:11 +00:00
Hal Finkel
9dc292f3c5 Phi speculation improvement for BasicAA
This is a partial solution to PR14351. It removes some of the special
significance of the first incoming phi value in the phi aliasing checking logic
in BasicAA. In the context of a loop, the old logic assumes that the first
incoming value is the interesting one (meaning that it is the one that comes
from outside the loop), but this is often not the case.  With this change, we
now test first the incoming value that comes from a block other than the parent
of the phi being tested.

llvm-svn: 168245
2012-11-17 02:33:15 +00:00
Eli Friedman
d7496f6688 Mark FP_EXTEND form v2f32 to v2f64 as "expand" for ARM NEON. Patch by Pete Couperus.
llvm-svn: 168240
2012-11-17 01:52:46 +00:00
Nadav Rotem
6ff38dc8d2 LoopVectorizer: Add initial support for pointer induction variables (for example: *dst++ = *src++).
At the moment we still require to have an integer induction variable (for example: i++).

llvm-svn: 168231
2012-11-17 00:27:03 +00:00
Akira Hatanaka
869eb1acb9 Initial implementation of MipsTargetLowering::isLegalAddressingMode.
llvm-svn: 168230
2012-11-17 00:25:41 +00:00
Weiming Zhao
8a202f0a49 Rename methods like PairSRegs() to createSRegpairNode() to meet our coding
style requirement.

llvm-svn: 168229
2012-11-17 00:23:35 +00:00
Evan Cheng
3fb5893b5d Teach SROA rewriteVectorizedStoreInst to handle cases when the loaded value is narrower than the stored value. rdar://12713675
llvm-svn: 168227
2012-11-17 00:05:06 +00:00
Eric Christopher
5843894e1e Add some basic support for the fission addr forms to DebugInfo.
llvm-svn: 168223
2012-11-16 23:44:11 +00:00
Weiming Zhao
85dce59506 Remove hard coded registers in ARM ldrexd and strexd instructions
This patch replaces the hard coded GPR pair [R0, R1] of
Intrinsic:arm_ldrexd and [R2, R3] of Intrinsic:arm_strexd with
even/odd GPRPair reg class.
Similar to the lowering of atomic_64 operation.

llvm-svn: 168207
2012-11-16 21:55:34 +00:00
Andrew Trick
a66c9f2861 Use array_pod_sort instead of std::sort.
llvm-svn: 168203
2012-11-16 21:33:38 +00:00
Anton Korobeynikov
3cd85d754d Make sure FABS on v2f32 and v4f32 is legal on ARM NEON
This fixes PR14359

llvm-svn: 168200
2012-11-16 21:15:20 +00:00
Richard Osborne
c8f73df738 Fix handling of aliases to functions.
An alias to a function should use pc relative addressing.

llvm-svn: 168199
2012-11-16 21:12:38 +00:00
Justin Holewinski
a794462d5b [NVPTX] Order global variables in def-use order before emiting them in the final assembly
llvm-svn: 168198
2012-11-16 21:03:51 +00:00
Justin Holewinski
cef6246d31 Preserve address space of forward-referenced global variables in the LL parser
Before, the parser would assert on the following code:

@a2 = global i8 addrspace(1)* @a
@a = addrspace(1) global i8 0

because the type of @a was "i8*" instead of "i8 addrspace(1)*" when parsing
the initializer for @a2.

llvm-svn: 168197
2012-11-16 21:03:47 +00:00
Duncan Sands
e52f0de8bb Make this easier to understand, as suggested by Chandler.
llvm-svn: 168196
2012-11-16 20:53:08 +00:00
Craig Topper
2da127004b Remove conditions from 'else if' that were guaranteed by preceding 'if'.
llvm-svn: 168191
2012-11-16 20:01:39 +00:00
Duncan Sands
33a1bb1041 InstructionSimplify should be able to simplify A+B==B+A to 'true'
but wasn't due to the same logic bug that caused PR14361.

llvm-svn: 168186
2012-11-16 19:41:26 +00:00
Joe Abbey
1b6e700a16 Using const cast to alleviate a warning.
A PR is being filed to address some code issues here.

llvm-svn: 168185
2012-11-16 19:38:42 +00:00
Craig Topper
bf37f13f74 Factor out the final FADD that's common to multiple code paths in the visitLog* functions.
llvm-svn: 168183
2012-11-16 19:08:44 +00:00
Chris Lattner
751629a75b move irrelevant attribution.
llvm-svn: 168182
2012-11-16 18:58:23 +00:00
Duncan Sands
86ca3afe2e Fix PR14361: wrong simplification of A+B==B+A. You may think that the old logic
replaced by this patch is equivalent to the new logic, but you'd be wrong, and
that's exactly where the bug was.  There's a similar bug in instsimplify which
manifests itself as instsimplify failing to simplify this, rather than doing it
wrong, see next commit.

llvm-svn: 168181
2012-11-16 18:55:49 +00:00
Hans Wennborg
aecbcb33c6 SimplifyCFG: Don't assume non-null ScalarTargetTransformInfo.
Patch by Pekka Jääskeläinen!

llvm-svn: 168176
2012-11-16 18:22:08 +00:00