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

80261 Commits

Author SHA1 Message Date
Dan Gohman
20fd978e4b Just like in regular escape analysis, loads and stores through
(but not of) a block pointer do not cause the block pointer to
escape. This fixes rdar://10803830.

llvm-svn: 150424
2012-02-13 22:57:02 +00:00
Kostya Serebryany
5cd1e1380f ThreadSanitizer, a race detector. First LLVM commit.
Clang patch (flags) will follow shortly.
The run-time library will also follow, but not immediately.

llvm-svn: 150423
2012-02-13 22:50:51 +00:00
Owen Anderson
13efe74a97 v2f16 is a floating point type. Add symbolic floating point type ranges to prevent this kind of issue in the future.
llvm-svn: 150416
2012-02-13 21:47:20 +00:00
Andrew Trick
b94e7e93b2 LiveIntervalAnalysis does not depend on MachineLoopInfo.
llvm-svn: 150411
2012-02-13 20:44:42 +00:00
Dylan Noblesmith
d07dd21f5c add LLVM_VERSION_MAJOR and _MINOR defines
This is useful for clients that want to maintain compatibility
across multiple releases of LLVM. Currently users like Klee and
Mesa all have to roll their own 'parse llvm-config --version
output and generate defines' solution.

Also reuse the new macros so that version information is less
redundant/likely to fall out of sync again in the future.

llvm-svn: 150405
2012-02-13 18:48:10 +00:00
Jakob Stoklund Olesen
52b793ba37 Check regmask interference for -join-physregs.
llvm-svn: 150404
2012-02-13 18:17:04 +00:00
Nadav Rotem
2141a8413e Fix a bug in DAGCombine for the optimization of BUILD_VECTOR. We cant generate a shuffle node from two vectors of different types.
llvm-svn: 150383
2012-02-13 12:42:26 +00:00
Ahmed Charles
e92b73aed8 Remove duplicate code in this header file which seemed to undergo a copy/paste fiasco.
llvm-svn: 150369
2012-02-13 09:45:36 +00:00
Craig Topper
f70ffc68b2 Still more vector_shuffle pattern removal.
llvm-svn: 150365
2012-02-13 07:23:41 +00:00
Ahmed Charles
bf926759cc Fix various issues (or do cleanups) found by enabling certain MSVC warnings.
- Use unsigned literals when the desired result is unsigned. This mostly allows unsigned/signed mismatch warnings to be less noisy even if they aren't on by default.
- Remove misplaced llvm_unreachable.
- Add static to a declaration of a function on MSVC x86 only.
- Change some instances of calling a static function through a variable to simply calling that function while removing the unused variable.

llvm-svn: 150364
2012-02-13 06:30:56 +00:00
Craig Topper
3073033e59 Remove more vector_shuffle patterns for unpack. These should be target specific nodes when they get to isel.
llvm-svn: 150363
2012-02-13 05:48:49 +00:00
Craig Topper
5cb2de69d8 Recommit r150328. Previous test failures should be fixed by r150360.
llvm-svn: 150362
2012-02-13 05:10:10 +00:00
Craig Topper
1487726cdf Revert accidental commit of a pruned testcase from r150360.
llvm-svn: 150361
2012-02-13 04:33:33 +00:00
Craig Topper
250c8fb194 Update CanXFormVExtractWithShuffleIntoLoad to ensure bitcasts of loads only have one use. Matches DAGCombiner and prevents vector_shuffles from reaching isel.
llvm-svn: 150360
2012-02-13 04:30:38 +00:00
NAKAMURA Takumi
50b0952aa9 Revert r150328, "Remove more vector_shuffle patterns."
It caused 3 failures on pre-penryn and non-x86(generic) hosts.

llvm-svn: 150357
2012-02-13 00:10:15 +00:00
Pete Cooper
b1229a8866 Fixed bug when custom lowering DEC64m on x86.
If the DEC node had more than one user, it was doing this lowering but
leaving the original DEC node around and so decrementing twice.

Fixes PR11964.

llvm-svn: 150356
2012-02-13 00:10:03 +00:00
Nadav Rotem
ea4aecb3e5 This patch addresses the problem of poor code generation for the zext
v8i8 -> v8i32 on AVX machines. The codegen often scalarizes ANY_EXTEND nodes.
The DAGCombiner has two optimizations that can mitigate the problem. First,
if all of the operands of a BUILD_VECTOR node are extracted from an ZEXT/ANYEXT
nodes, then it is possible to create a new simplified BUILD_VECTOR which uses
UNDEFS/ZERO values to eliminate the scalar ZEXT/ANYEXT nodes.
Second, another dag combine optimization lowers BUILD_VECTOR into a shuffle
vector instruction.

In the case of zext v8i8->v8i32 on AVX, a value in an XMM register is to be
shuffled into a wide YMM register.

This patch modifes the second optimization and allows the creation of
shuffle vectors even when the newly generated vector and the original vector
from which we extract the values are of different types.

llvm-svn: 150340
2012-02-12 15:05:31 +00:00
Benjamin Kramer
b6822ef890 StringSwitchify the rest of Triple.cpp.
llvm-svn: 150332
2012-02-12 10:56:52 +00:00
Chandler Carruth
6e32c6c35e Switch a bunch of manual if-chains to use StringSwitch. Clean them up in
the process. Some of these are still a bit gross.

Still, this cuts 80 some lines out of this ridiculous file. ;]

llvm-svn: 150331
2012-02-12 09:27:38 +00:00
Craig Topper
76547b82f2 Remove more vector_shuffle patterns.
llvm-svn: 150328
2012-02-12 08:14:35 +00:00
Eli Bendersky
ff2a79674c Expose the ELFObjectFile class directly in the Object/ELF.h header, similarly
to what's done for MachO and COFF. This allows advanced uses of the class to
be implemented outside the Object library. In particular, the DyldELFObject
subclass is now moved into its logical home - ExecutionEngine/RuntimeDyld.

This patch was reviewed by Michael Spencer.

llvm-svn: 150327
2012-02-12 06:12:10 +00:00
Nick Lewycky
783233a7f8 Handle InvokeInst in EvaluateBlock. Don't try to support exceptions, it's just
that no optz'ns have run yet to convert invokes to calls.

llvm-svn: 150326
2012-02-12 05:09:35 +00:00
Nick Lewycky
52d8590d4f false is totally null!
llvm-svn: 150324
2012-02-12 02:17:18 +00:00
Nick Lewycky
0e211cfa88 Remove redundant getAnalysis<> calls in GlobalOpt. Add a few Itanium ABI calls
to TargetLibraryInfo and use one of them in GlobalOpt.

llvm-svn: 150323
2012-02-12 02:15:20 +00:00
Nick Lewycky
5c19566e32 Pass TargetData and TargetLibraryInfo through to the constant folder. Fixes a
few fixme's when TLI was added.

llvm-svn: 150322
2012-02-12 01:13:18 +00:00
Craig Topper
96a1a31c5c Remove more vector_shuffle patterns.
llvm-svn: 150321
2012-02-12 01:07:34 +00:00
Nick Lewycky
d43cd0fbd7 Fix function name in comment to match actual name. Fix comments that are using
doxy-style on local variables to not do so. Fix one 80-col violation.

llvm-svn: 150320
2012-02-12 00:52:26 +00:00
Nick Lewycky
50555ab809 Don't traverse the PHI nodes twice. No functionality change!
llvm-svn: 150319
2012-02-12 00:47:24 +00:00
Craig Topper
7c85e63244 Remove more vector_shuffle patterns.
llvm-svn: 150314
2012-02-11 23:31:01 +00:00
Anton Korobeynikov
5996573d4b Add support for implicit TLS model used with MS VC runtime.
Patch by Kai Nacke!

llvm-svn: 150307
2012-02-11 17:26:53 +00:00
Benjamin Kramer
9a10a94e1a Don't mix declarations and code.
llvm-svn: 150305
2012-02-11 16:01:02 +00:00
Benjamin Kramer
44e872829d Make the EDis tables const.
llvm-svn: 150304
2012-02-11 14:51:07 +00:00
Benjamin Kramer
675a84a6ea Reuse the enum names from X86Desc in the X86Disassembler.
This requires some gymnastics to make it available for C code. Remove the names
from the disassembler tables, making them relocation free.

llvm-svn: 150303
2012-02-11 14:50:54 +00:00
Bill Wendling
55933f75ab Document the new module flags.
llvm-svn: 150301
2012-02-11 11:59:36 +00:00
Bill Wendling
0dfc3d1e3e [WIP] Initial code for module flags.
Module flags are key-value pairs associated with the module. They include a
'behavior' value, indicating how module flags react when mergine two
files. Normally, it's just the union of the two module flags. But if two module
flags have the same key, then the resulting flags are dictated by the behaviors.

Allowable behaviors are:

     Error
       Emits an error if two values disagree.

     Warning
       Emits a warning if two values disagree.

     Require
       Emits an error when the specified value is not present
       or doesn't have the specified value. It is an error for
       two (or more) llvm.module.flags with the same ID to have
       the Require behavior but different values. There may be
       multiple Require flags per ID.

     Override
       Uses the specified value if the two values disagree. It
       is an error for two (or more) llvm.module.flags with the
       same ID to have the Override behavior but different
       values.

llvm-svn: 150300
2012-02-11 11:38:06 +00:00
Craig Topper
59398d7eb3 Remove some patterns for matching vector_shuffle instructions since vector_shuffles should be custom lowered before isel.
llvm-svn: 150299
2012-02-11 07:43:35 +00:00
Andrew Trick
f8d8f89c1c Add TargetPassConfig hooks for scheduling/bundling.
In case the MachineScheduling pass I'm working on doesn't work well
for another target, they can completely override it. This also adds a
hook immediately after the RegAlloc pass to cleanup immediately after
vregs go away. We may want to fold it into the postRA hook later.

llvm-svn: 150298
2012-02-11 07:11:32 +00:00
Andrew Trick
e199b4e82e comment
llvm-svn: 150297
2012-02-11 07:11:29 +00:00
Craig Topper
64d1a36ad0 Fix shuffle lowering code to stop creating temporary DAG nodes to do shuffle mask checks on. This seemed to be confusing things such that vector_shuffle ops to got through to iselection. This is another step towards removing the vector_shuffle handling patterns from isel.
llvm-svn: 150296
2012-02-11 06:24:48 +00:00
Jakob Stoklund Olesen
a5b1e7bf64 Allow Post-RA LICM to hoist reserved register reads.
When using register masks, registers like %rip are clobbered by the
register mask. LICM should still be able to hoist instructions reading
%rip from a loop containing calls.

llvm-svn: 150288
2012-02-11 00:44:19 +00:00
Jakob Stoklund Olesen
cea998ba92 Handle register masks in local live range splitting.
Again the goal is to produce identical assembly with register mask
operands enabled.

llvm-svn: 150287
2012-02-11 00:42:18 +00:00
Jakob Stoklund Olesen
cdb77e2491 Don't read PreRegAlloc before it is initialized.
llvm-svn: 150286
2012-02-11 00:40:36 +00:00
Jim Grosbach
39dbf3f09e Revert r150222, as the clang driver now handles this properly.
Now that the clang driver passes the CPU and feature information to
the backend when processing assembly files (150273), this isn't necessary.

llvm-svn: 150274
2012-02-10 20:38:46 +00:00
Jakob Stoklund Olesen
40ef7644a5 Clean up comment.
llvm-svn: 150262
2012-02-10 19:27:34 +00:00
Jakob Stoklund Olesen
b58e9ef8b1 Add a static MachineOperand::clobbersPhysReg().
It can be necessary to detach a register mask pointer from its
MachineOperand. This method is convenient for checking clobbered
physregs on a detached bitmask pointer.

llvm-svn: 150261
2012-02-10 19:23:53 +00:00
Jakob Stoklund Olesen
4fe2a13535 Add register mask support to InterferenceCache.
This makes global live range splitting behave identically with and
without register mask operands.

This is not necessarily the best way of using register masks for live
range splitting.  It would be more efficient to first split global live
ranges around calls (i.e., register masks), and reserve the fine grained
per-physreg interference guidance for global live ranges that do not
cross calls.

For now the goal is to produce identical assembly when enabling register
masks.

llvm-svn: 150259
2012-02-10 18:58:34 +00:00
Jakob Stoklund Olesen
c67bcacba1 Remove unused variable.
llvm-svn: 150258
2012-02-10 18:52:15 +00:00
Pete Cooper
57c51010db Added description of invariant.load metadata to LangRef. It was added to the compiler in r144100
llvm-svn: 150257
2012-02-10 18:13:54 +00:00
Jason W Kim
99568e0dee Make valgrind happy.
llvm-svn: 150251
2012-02-10 16:07:59 +00:00
Hal Finkel
56c6162a55 Update BBVectorize to use aliasesUnknownInst.
This allows BBVectorize to check the "unknown instruction" list in the
alias sets. This is important to prevent instruction fusing from reordering
function calls. Resolves PR11920.

llvm-svn: 150250
2012-02-10 15:52:40 +00:00