Justin Bogner [Tue, 17 Feb 2015 09:21:43 +0000 (09:21 +0000)]
Revert "InstrProf: Add unit tests for the profile reader and writer"
This added API to the InstrProfWriter to write to a string so I could
write unittests without using temp files. This doesn't really work,
since the format has tighter alignment requirements than a char.
This reverts r229478 and its follow-up, r229481.
llvm-svn: 229483
Elena Demikhovsky [Tue, 17 Feb 2015 09:20:12 +0000 (09:20 +0000)]
AVX-512: changes in intel_ocl_bi calling conventions
- added mask types v8i1 and v16i1 to possible function parameters
- enabled passing 512-bit vectors in standard CC
- added a test for KNL intel_ocl_bi conventions
llvm-svn: 229482
Justin Bogner [Tue, 17 Feb 2015 08:26:06 +0000 (08:26 +0000)]
InstrProf: Add missing header from r229478
llvm-svn: 229481
Michael Kuperstein [Tue, 17 Feb 2015 08:22:51 +0000 (08:22 +0000)]
[X86] Combine vector anyext + and into a vector zext
Vector zext tends to get legalized into a vector anyext, represented as a vector shuffle with an undef vector + a bitcast, that gets ANDed with a mask that zeroes the undef elements.
Combine this into an explicit shuffle with a zero vector instead. This allows shuffle lowering to match it as a zext, instead of matching it as an anyext and emitting an explicit AND.
This combine only covers a subset of the cases, but it's a start.
Differential Revision: http://reviews.llvm.org/D7666
llvm-svn: 229480
Tobias Grosser [Tue, 17 Feb 2015 08:15:14 +0000 (08:15 +0000)]
Add missing files to autoconf build
llvm-svn: 229479
Justin Bogner [Tue, 17 Feb 2015 07:50:59 +0000 (07:50 +0000)]
Re-apply "InstrProf: Add unit tests for the profile reader and writer"
Add these tests again, but use va_list instead of initializer lists.
This reverts r229456, reapplying r229455.
llvm-svn: 229478
Jonas Paulsson [Tue, 17 Feb 2015 07:45:06 +0000 (07:45 +0000)]
[PBQP] NDEBUG guards added around code needed for assert.
wasConservativelyAllocatable() is only called to assert that a conservatively
allocatable node wasn't forced to spill.
llvm-svn: 229477
Tobias Grosser [Tue, 17 Feb 2015 07:39:25 +0000 (07:39 +0000)]
Update isl to 0ae2b02 "isl_seq_combine: optimize for common case"
This is just a single commit that includes a performance optimization that
should improve dependence analysis time. Our performance bots should measure
this difference.
llvm-svn: 229476
Eric Christopher [Tue, 17 Feb 2015 07:21:21 +0000 (07:21 +0000)]
Make the PowerPC AsmPrinter independent of global subtarget
initialization. Initialize the subtarget once per function and
migrate EmitStartOfAsmFile to either use attributes on the
TargetMachine or get information from all of the various
subtargets.
llvm-svn: 229475
Craig Topper [Tue, 17 Feb 2015 07:18:01 +0000 (07:18 +0000)]
[X86] Convert palignr builtin handling to use shuffle form of right shift instead of intrinsics. This should allow the instrinsics to removed from the backend.
llvm-svn: 229474
Justin Bogner [Tue, 17 Feb 2015 06:56:49 +0000 (06:56 +0000)]
InstrProf: Use a test fixture in the coverage mapping tests
llvm-svn: 229473
Eric Christopher [Tue, 17 Feb 2015 06:45:17 +0000 (06:45 +0000)]
Add a FIXME to move IsLittleEndian to the target machine.
llvm-svn: 229472
Eric Christopher [Tue, 17 Feb 2015 06:45:15 +0000 (06:45 +0000)]
Move ABI handling and 64-bitness to the PowerPC target machine.
This required changing how the computation of the ABI is handled
and how some of the checks for ABI/target are done.
llvm-svn: 229471
Alex Denisov [Tue, 17 Feb 2015 06:43:10 +0000 (06:43 +0000)]
Add more tests for NSArray/NSDictionary literals
llvm-svn: 229470
Craig Topper [Tue, 17 Feb 2015 06:37:58 +0000 (06:37 +0000)]
[X86] Merge the 2 separate builtin handlers for PALIGNR into a single one that handles both.
llvm-svn: 229469
Craig Topper [Tue, 17 Feb 2015 06:22:50 +0000 (06:22 +0000)]
[X86] Remove code that does custom handling of the builtin for MMX palignr. This code is unreachable since its already marked for non-custom handling in llvm's IntrinsicsX86.td file.
llvm-svn: 229468
Lang Hames [Tue, 17 Feb 2015 05:53:28 +0000 (05:53 +0000)]
[Orc][Kaleidoscope] Fix misnumbered steps in comments, plus tidy one
explanation up a little.
llvm-svn: 229467
Lang Hames [Tue, 17 Feb 2015 05:40:42 +0000 (05:40 +0000)]
[Orc][Kaleidoscope] Add an example of extreme-laziness in Orc.
The version of the tutorial uses the new compile callbacks API to inject stubs
that trigger IRGen & Codegen of their respective function bodies when they are
first called.
llvm-svn: 229466
Lang Hames [Tue, 17 Feb 2015 05:36:59 +0000 (05:36 +0000)]
[Orc][Kaleidoscope] Update the MainLoop code of the orc/kaleidoscope tutorials
to get rid of the duplicate prompt. NFC.
llvm-svn: 229465
Duncan P. N. Exon Smith [Tue, 17 Feb 2015 02:42:45 +0000 (02:42 +0000)]
AsmPrinter: Use DIExpression default constructor, NFC
llvm-svn: 229464
Chandler Carruth [Tue, 17 Feb 2015 02:12:24 +0000 (02:12 +0000)]
[x86] Teach the unpack lowering to try wider element unpacks.
This allows it to match still more places where previously we would have
to fall back on floating point shuffles or other more complex lowering
strategies.
I'm hoping to replace some of the hand-rolled unpack matching with this
routine is it gets more and more clever.
llvm-svn: 229463
Hal Finkel [Tue, 17 Feb 2015 01:36:59 +0000 (01:36 +0000)]
[BDCE] Add a bit-tracking DCE pass
BDCE is a bit-tracking dead code elimination pass. It is based on ADCE (the
"aggressive DCE" pass), with the added capability to track dead bits of integer
valued instructions and remove those instructions when all of the bits are
dead.
Currently, it does not actually do this all-bits-dead removal, but rather
replaces the instruction's uses with a constant zero, and lets instcombine (and
the later run of ADCE) do the rest. Because we essentially get a run of ADCE
"for free" while tracking the dead bits, we also do what ADCE does and removes
actually-dead instructions as well (this includes instructions newly trivially
dead because all bits were dead, but not all such instructions can be removed).
The motivation for this is a case like:
int __attribute__((const)) foo(int i);
int bar(int x) {
x |= (4 & foo(5));
x |= (8 & foo(3));
x |= (16 & foo(2));
x |= (32 & foo(1));
x |= (64 & foo(0));
x |= (128& foo(4));
return x >> 4;
}
As it turns out, if you order the bit-field insertions so that all of the dead
ones come last, then instcombine will remove them. However, if you pick some
other order (such as the one above), the fact that some of the calls to foo()
are useless is not locally obvious, and we don't remove them (without this
pass).
I did a quick compile-time overhead check using sqlite from the test suite
(Release+Asserts). BDCE took ~0.4% of the compilation time (making it about
twice as expensive as ADCE).
I've not looked at why yet, but we eliminate instructions due to having
all-dead bits in:
External/SPEC/CFP2006/447.dealII/447.dealII
External/SPEC/CINT2006/400.perlbench/400.perlbench
External/SPEC/CINT2006/403.gcc/403.gcc
MultiSource/Applications/ClamAV/clamscan
MultiSource/Benchmarks/7zip/7zip-benchmark
llvm-svn: 229462
Lang Hames [Tue, 17 Feb 2015 01:18:38 +0000 (01:18 +0000)]
[Orc] Update the Orc indirection utils and refactor the CompileOnDemand layer.
This patch replaces most of the Orc indirection utils API with a new class:
JITCompileCallbackManager, which creates and manages JIT callbacks.
Exposing this functionality directly allows the user to create callbacks that
are associated with user supplied compilation actions. For example, you can
create a callback to lazyily IR-gen something from an AST. (A kaleidoscope
example demonstrating this will be committed shortly).
This patch also refactors the CompileOnDemand layer to use the
JITCompileCallbackManager API.
llvm-svn: 229461
Hal Finkel [Tue, 17 Feb 2015 00:11:19 +0000 (00:11 +0000)]
Specify arch in test/CodeGen/X86/float-conv-elim.ll
This test was failing on non-x86 hosts because it specified a cpu of x86_64,
but not an architecture. x86_64 is obviously not a valid cpu on all
architectures.
llvm-svn: 229460
Duncan P. N. Exon Smith [Tue, 17 Feb 2015 00:02:27 +0000 (00:02 +0000)]
AsmPrinter: Stop creating DebugLocs
While looking at a heap profile of a clang LTO bootstrap with -g, I
noticed that 2.2% of memory in an `llvm-lto` of clang is from calling
`DebugLoc::get()` in `collectVariableInfo()` (accounting for ~40% of
memory used for `MDLocation`s).
I suspect this was introduced by r226736, whose goal was to prevent
uniquing of `DebugLoc`s (goal achieved, if so).
There's no reason we need a `DebugLoc` here at all -- it was just being
used for (in)convenient API -- so the fix is to pass the scope and
inlined-at directly to `LexicalScopes::findInlinedScope()`.
llvm-svn: 229459
Fariborz Jahanian [Mon, 16 Feb 2015 23:49:44 +0000 (23:49 +0000)]
[Objctive-C sema]. Do not do the unused-getter-return-value
warning when property getter is used in direct method call
and return value of property is unused. rdar://
19773512
llvm-svn: 229458
Hal Finkel [Mon, 16 Feb 2015 23:46:30 +0000 (23:46 +0000)]
[PowerPC] Support non-direct-sub/superclass VSX copies
Our register allocation has become better recently, it seems, and is now
starting to generate cross-block copies into inflated register classes. These
copies are not transformed into subregister insertions/extractions by the
PPCVSXCopy class, and so need to be handled directly by
PPCInstrInfo::copyPhysReg. The code to do this was *almost* there, but not
quite (it was unnecessarily restricting itself to only the direct
sub/super-register-class case (not copying between, for example, something in
VRRC and the lower-half of VSRC which are super-registers of F8RC).
Triggering this behavior manually is difficult; I'm including two
bugpoint-reduced test cases from the test suite.
llvm-svn: 229457
Justin Bogner [Mon, 16 Feb 2015 23:31:07 +0000 (23:31 +0000)]
Revert "InstrProf: Add unit tests for the profile reader and writer"
Looks like the bots don't like my initializer lists.
This reverts r229455
llvm-svn: 229456
Justin Bogner [Mon, 16 Feb 2015 23:27:48 +0000 (23:27 +0000)]
InstrProf: Add unit tests for the profile reader and writer
This required some minor API to be added to these types to avoid
needing temp files.
Also, I've used initializer lists in the tests, as MSVC 2013 claims to
support them. I'll redo this without them if the bots complain.
llvm-svn: 229455
Aaron Ballman [Mon, 16 Feb 2015 23:12:37 +0000 (23:12 +0000)]
Minor tweaks to r229447 to ensure the attribute is properly quoted when diagnosed.
llvm-svn: 229454
Simon Atanasyan [Mon, 16 Feb 2015 23:08:20 +0000 (23:08 +0000)]
[Mips] Replace a magic number by enumeration
No functional changes.
llvm-svn: 229453
Simon Atanasyan [Mon, 16 Feb 2015 22:59:29 +0000 (22:59 +0000)]
[Mips] Add .MIPS.options section descriptor kinds enumeration
No functional changes.
llvm-svn: 229452
Lang Hames [Mon, 16 Feb 2015 22:36:25 +0000 (22:36 +0000)]
[Orc] Add an emitAndFinalize method to the ObjectLinkingLayer, IRCompileLayer
and LazyEmittingLayer of Orc.
This method allows you to immediately emit and finalize a module. It is required
by an upcoming refactor of the indirection utils and the compile-on-demand
layer.
I've filed http://llvm.org/PR22608 to write unit tests for this and other Orc
APIs.
llvm-svn: 229451
Nico Weber [Mon, 16 Feb 2015 22:35:45 +0000 (22:35 +0000)]
Wrap to 80 columns. No behavior change.
llvm-svn: 229450
Nico Weber [Mon, 16 Feb 2015 22:32:46 +0000 (22:32 +0000)]
For variables with dependent type, don't crash on `var->::new` or `var->__super`
ParsePostfixExpressionSuffix() for '->' (or '.') postfixes first calls
ActOnStartCXXMemberReference() to inform sema that a member reference is about
to start, and that function lets the parser know if sema thinks that the
base expression's type could allow a pseudo destructor from a semantic point of
view (for example, if the the base expression has a dependent type).
ParsePostfixExpressionSuffix() then calls ParseOptionalCXXScopeSpecifier() and
passes MayBePseudoDestructor on to that function, expecting the function to
set it to false if a pseudo destructor is impossible from a syntactic point of
view (due to a lack of '~' sigil). However, ParseOptionalCXXScopeSpecifier()
had early-outs for ::new and __super, so MayBePseudoDestructor stayed true,
so we tried to parse a pseudo dtor, and then became confused since we couldn't
find a '~'. Move the snippet in ParseOptionalCXXScopeSpecifier() that sets
MayBePseudoDestructor to false above the early exits.
Parts of this found by SLi's bot.
llvm-svn: 229449
Ahmed Bougacha [Mon, 16 Feb 2015 22:30:08 +0000 (22:30 +0000)]
[ARM] Remove unused declaration. NFC.
GlobalMerge was moved to lib/CodeGen a while ago, and is no longer
called "ARMGlobalMerge".
llvm-svn: 229448
Saleem Abdulrasool [Mon, 16 Feb 2015 22:27:01 +0000 (22:27 +0000)]
Sema: diagnose use of unscoped deprecated prior to C++14
The deprecated attribute was adopted as part of the C++14, however, there is a
GNU version available in C++11. When using C++ earlier than C++14, diagnose the
use of the attribute without the GNU scope, but only when using the generalised
attribute syntax.
llvm-svn: 229447
Saleem Abdulrasool [Mon, 16 Feb 2015 22:26:52 +0000 (22:26 +0000)]
Parse: return true from ParseCXX11AttributeArgs if an attribute was added
In the case that we diagnosed an invalid attribute due to missing or present
arguments, we would return false, indicating to the caller that the parsing
failed. However, we would have added the attribute in ParseAttributeArgsCommon
(which may have been called indirectly through ParseGNUAttributeArgs).
Returning true in this case ensures that a second copy of the attribute is not
added.
I haven't added a test case for this as the existing test will cover this with
the next commit which diagnoses a C++14 attribute applied in C++11 mode. Rather
than duplicating the existing test case, allow the tree to remain without a test
between this and the next change. We would see double warnings in the
[[deprecated()]] applied to a declaration in C++11 mode, which will cause an
error in the cxx0x-attributes test.
llvm-svn: 229446
Cameron McInally [Mon, 16 Feb 2015 22:15:42 +0000 (22:15 +0000)]
[AVX512] Make 512b vector floating point rounds legal on AVX512.
llvm-svn: 229445
Matthias Braun [Mon, 16 Feb 2015 22:05:17 +0000 (22:05 +0000)]
RegisterCoalescer: Don't rematerialize subregister definitions.
We cannot simply rematerialize instructions which only defining a
subregister, as the final value also depends on the previous
instructions.
This fixes test/CodeGen/R600/subreg-coalescer-bug.ll with subreg
liveness enabled.
llvm-svn: 229444
Matthias Braun [Mon, 16 Feb 2015 22:05:12 +0000 (22:05 +0000)]
RegisterCoalescer: Do not look for regclass of IMPLICIT_DEF.
IMPLICIT_DEF is a generic instruction and has no (fixed) output register
class defined. The rematerialization code of the register coalescer
should not scan the instruction description for a register class.
This fixes a problem showing up in
test/CodeGen/R600/subreg-coalescer-crash.ll with subregister liveness
enabled.
llvm-svn: 229443
Simon Atanasyan [Mon, 16 Feb 2015 21:52:43 +0000 (21:52 +0000)]
[Mips] Read GP0 value from .MIPS.options section
llvm-svn: 229442
Simon Atanasyan [Mon, 16 Feb 2015 21:52:35 +0000 (21:52 +0000)]
[Mips] Show error if MIPS_REGINFO section has invalid size
llvm-svn: 229441
Simon Atanasyan [Mon, 16 Feb 2015 21:52:27 +0000 (21:52 +0000)]
[Mips] Factor out the code to search section by type and flags into the
separate functions
No functional changes.
llvm-svn: 229440
Simon Pilgrim [Mon, 16 Feb 2015 21:50:56 +0000 (21:50 +0000)]
[X86][SSE] Add SSE MOVQ instructions to SSEPackedInt domain
Patch to explicitly add the SSE MOVQ (rr,mr,rm) instructions to SSEPackedInt domain - prevents a number of costly domain switches.
Differential Revision: http://reviews.llvm.org/D7600
llvm-svn: 229439
Mehdi Amini [Mon, 16 Feb 2015 21:47:58 +0000 (21:47 +0000)]
SelectionDAG: fold (fp_to_u/sint (s/uint_to_fp)) here too
Update SPARC tests to match.
From: Fiona Glaser <fglaser@apple.com>
llvm-svn: 229438
Mehdi Amini [Mon, 16 Feb 2015 21:47:54 +0000 (21:47 +0000)]
InstCombine: fold more cases of (fp_to_u/sint (u/sint_to_fp val))
Fixes radar
15486701.
From: Fiona Glaser <fglaser@apple.com>
llvm-svn: 229437
Mehdi Amini [Mon, 16 Feb 2015 21:47:50 +0000 (21:47 +0000)]
Tests: reformat sitofp.ll and use FileCheck
From: Fiona Glaser <fglaser@apple.com>
llvm-svn: 229436
Craig Topper [Mon, 16 Feb 2015 21:30:08 +0000 (21:30 +0000)]
[X86] Remove completely unnecessary switch statement.
llvm-svn: 229435
Justin Bogner [Mon, 16 Feb 2015 21:29:05 +0000 (21:29 +0000)]
InstrProf: Update for LLVM API change
Update for the API change in r229433
llvm-svn: 229434
Justin Bogner [Mon, 16 Feb 2015 21:28:58 +0000 (21:28 +0000)]
InstrProf: Use ErrorOr for IndexedInstrProfReader::create (NFC)
The other InstrProfReader::create factories were updated to return
ErrorOr in r221120, and it's odd for these APIs not to match.
llvm-svn: 229433
Nico Weber [Mon, 16 Feb 2015 21:21:12 +0000 (21:21 +0000)]
Fix typo in comment.
llvm-svn: 229432
Craig Topper [Mon, 16 Feb 2015 20:52:07 +0000 (20:52 +0000)]
[X86] Remove the multiply by 8 that goes into the shift constant for X86ISD::VSHLDQ and X86ISD::VSRLDQ. This simplifies the pattern matching in isel and allows these nodes to become the patterns embedded in the instruction.
llvm-svn: 229431
Craig Topper [Mon, 16 Feb 2015 20:51:59 +0000 (20:51 +0000)]
[X86] Remove x86.avx2.psll.dq.bs and x86.avx2.psrl.dq.bs intrinsics.
llvm-svn: 229430
Benjamin Kramer [Mon, 16 Feb 2015 20:37:00 +0000 (20:37 +0000)]
ASTMatchers: Make TypeList a variadic template and remove the implicit flattening of TypeLists.
Building trees of TypeLists is no longer necessary.
llvm-svn: 229429
Serge Pavlov [Mon, 16 Feb 2015 19:58:41 +0000 (19:58 +0000)]
Enhance printing SizeOfPackExpr in dump.
llvm-svn: 229428
Sergey Dmitrouk [Mon, 16 Feb 2015 19:51:06 +0000 (19:51 +0000)]
Do not add -fno-exceptions without -funwind-tables
Adding just -fno-exceptions breaks libunwind in quite mysterious way
when it's there, but exception handling doesn't work because of dummy
unwind tables.
Also as using exceptions implies references to symbols defined in
libcxx, abort build of libcxxabi as shared library if we have to keep
exceptions (when compiler supports -fno-exceptions, but not
-funwind-tables; one example would be a cross-compiler, in which case
testing for -funwind-tables flag by CMake actually requires libunwind to
be available before it's built).
llvm-svn: 229427
Aaron Ballman [Mon, 16 Feb 2015 19:38:52 +0000 (19:38 +0000)]
MSVC no longer requires the explicit cast operation to obtain a function pointer from this capture-less lambda. NFC.
llvm-svn: 229426
Matthias Braun [Mon, 16 Feb 2015 19:34:30 +0000 (19:34 +0000)]
ARM: Transfer kill flag when lowering VSTMQIA to VSTMDIA.
llvm-svn: 229425
Matthias Braun [Mon, 16 Feb 2015 19:34:27 +0000 (19:34 +0000)]
RegisterCoalescer: Improve previous fix for wrong def after.
The previous fix in r225503 was needlessly complicated. The problem goes
away as well if the arguments to MergeValueNumberInto are supplied in the
correct order.
This was previously missed because the existing code already had the
wrong order but an additional later Merge was hiding the bug for the
main liverange VNI.
llvm-svn: 229424
Tobias Grosser [Mon, 16 Feb 2015 19:33:40 +0000 (19:33 +0000)]
Update to isl
99d53692ba
This commit imports the latest isl version into lib/External/isl. The changes
relavant for Polly are:
1) Schedule trees [1] have been introduced as a more structured way to
describe schedules. Polly does not yet use them, but we may switch to them
in the near future.
2) Another set of coalescing changes [2] simplifies some data dependences and
removes a couple of code generation artifacts.
We now understand that the following sets can be merged:
{ Stmt_S1[i0, i1] -> Stmt_S2[i0 + i1] :
i0 >= 0 and i1 <= 1023 - i0 and i1 >= 1
Stmt_S1[i0, 0] -> Stmt_S2[i0] : i0 <= 1023 and i0 >= 1}
into:
{ Stmt_S1[i0, i1] -> Stmt_S2[i0 + i1] : i1 <= 1023 - i0 and i1 >= 0 and
i1 >= 1 - i0 and i0 >= 0 }
Changes of this kind reduce unnecessary specialization during code
generation.
- for (int c3 = 0; c3 <= 1023; c3 += 1) {
- if (c3 % 2 == 0) {
- Stmt_for_body3(c1, c3);
- } else
- Stmt_for_body3(c1, c3);
- }
+ for (int c3 = 0; c3 <= 1023; c3 += 1)
+ Stmt_for_body3(c1, c3);
[1] http://impact.gforge.inria.fr/impact2014/papers/impact2014-verdoolaege.pdf
[2] http://impact.gforge.inria.fr/impact2015/papers/impact2015-verdoolaege.pdf
llvm-svn: 229423
Aaron Ballman [Mon, 16 Feb 2015 19:33:36 +0000 (19:33 +0000)]
MSVC 2013 does not ICE on this code in the same fashion that MSVC 2012 did; NFC.
llvm-svn: 229422
Duncan P. N. Exon Smith [Mon, 16 Feb 2015 19:18:01 +0000 (19:18 +0000)]
Bitcode: Fix major regression: large files w/ debug info
The metadata/value split introduced a major regression reading large
bitcode files that contain debug info (or other cyclic (non-self
reference) metadata graphs). For the first time in a while, I dropped
from libLTO.dylib down to `llvm-lto` with a non-trivial bitcode file
(~350MB), and I hit this when reading the result of ld64's `-save-temps`
in `llvm-lto`.
Here's pseudo-code for what was going on:
read-main-metadata-block:
for each md:
if has-fwd-ref: // Only true for cyclic graphs.
any-fwd-refs <- true
if any-fwd-refs:
foreach md:
resolve-cycles(md) // Handle cycles.
foreach function:
read-function-metadata-block: // Such as !alias, !loop
if any-fwd-refs:
foreach md: // (all metadata, not just this block)
resolve-cycles(md) // A no-op, but the loop is expensive!!
This commit resets the `AnyFwdRefs` flag to `false`. This on its own
was enough to change my Release+Asserts `llvm-lto` time for reading this
bitcode from over 20 minutes (I gave up on it) to 20 seconds. I've gone
further by tracking the min/max metadata forward-references in a
metadata block. This protects against a schema that has lots of
functions that each reference their own metadata cycle.
Unfortunately, this regression is in the 3.6 branch as well.
llvm-svn: 229421
David Majnemer [Mon, 16 Feb 2015 19:10:02 +0000 (19:10 +0000)]
ConstantFold: Properly fold GEP indices wider than i64
llvm-svn: 229420
James Molloy [Mon, 16 Feb 2015 18:59:54 +0000 (18:59 +0000)]
Run LICM as part of the cleanup phase from the scalar optimizer.
Things like LoopUnrolling can produce loop invariant values - make sure
we pick them up.
llvm-svn: 229419
Aaron Ballman [Mon, 16 Feb 2015 18:34:57 +0000 (18:34 +0000)]
We require MSVC 1800 as our minimum, so these checks can safely go away; NFC. (It seems this code has been copy/pasted around, unfortunately.)
llvm-svn: 229417
Serge Pavlov [Mon, 16 Feb 2015 18:27:41 +0000 (18:27 +0000)]
Regression test for RP6954.
llvm-svn: 229416
Aaron Ballman [Mon, 16 Feb 2015 18:23:00 +0000 (18:23 +0000)]
We require MSVC 1800 as our minimum, so these checks can safely go away; NFC.
llvm-svn: 229415
Aaron Ballman [Mon, 16 Feb 2015 18:21:19 +0000 (18:21 +0000)]
MSVC 2013 supports std::forward_as_tuple, while MSVC 2012 did not; so we can move to using the improved API.
llvm-svn: 229414
Andrew Trick [Mon, 16 Feb 2015 18:10:47 +0000 (18:10 +0000)]
AArch64: Safely handle the incoming sret call argument.
This adds a safe interface to the machine independent InputArg struct
for accessing the index of the original (IR-level) argument. When a
non-native return type is lowered, we generate the hidden
machine-level sret argument on-the-fly. Before this fix, we were
representing this argument as OrigArgIndex == 0, which is an outright
lie. In particular this crashed in the AArch64 backend where we
actually try to access the type of the original argument.
Now we use a sentinel value for machine arguments that have no
original argument index. AArch64, ARM, Mips, and PPC now check for this
case before accessing the original argument.
Fixes <rdar://
19792160> Null pointer assertion in AArch64TargetLowering
llvm-svn: 229413
Hal Finkel [Mon, 16 Feb 2015 18:08:00 +0000 (18:08 +0000)]
[ADCE] Don't indent inside an anonymous namespace
To be consistent with what clang-format does, don't add extra indentation
inside an anonymous namespace. NFC.
llvm-svn: 229412
Matt Arsenault [Mon, 16 Feb 2015 18:03:59 +0000 (18:03 +0000)]
Revert r229409: "Hack to try deleting file from build bots"
llvm-svn: 229411
Aaron Ballman [Mon, 16 Feb 2015 18:00:11 +0000 (18:00 +0000)]
MSVC 2013 appears to be able to compile make_ptr_range without issue, so removing that guard in the unit test.
llvm-svn: 229410
Matt Arsenault [Mon, 16 Feb 2015 17:33:12 +0000 (17:33 +0000)]
Hack to try deleting file from build bots
llvm-svn: 229409
Sanjay Patel [Mon, 16 Feb 2015 17:26:51 +0000 (17:26 +0000)]
x86-64 ABI: unwrap single element structs / arrays of 256-bit vectors to pass and return in registers
This is a patch for PR22563 ( http://llvm.org/bugs/show_bug.cgi?id=22563 ).
We were not correctly unwrapping a single 256-bit AVX vector that was defined as an array of 1 inside a struct.
We would generate a <4 x float> param/return value instead of <8 x float> and lose half of the vector.
Differential Revision: http://reviews.llvm.org/D7614
llvm-svn: 229408
Matt Arsenault [Mon, 16 Feb 2015 17:11:58 +0000 (17:11 +0000)]
Don't create output file in test
llvm-svn: 229407
James Molloy [Mon, 16 Feb 2015 17:02:00 +0000 (17:02 +0000)]
[LoopReroll] Relax some assumptions a little.
We won't find a root with index zero in any loop that we are able to reroll.
However, we may find one in a non-rerollable loop, so bail gracefully instead
of failing hard.
llvm-svn: 229406
James Molloy [Mon, 16 Feb 2015 17:01:52 +0000 (17:01 +0000)]
[LoopReroll] Don't crash on dead code
If a PHI has no users, don't crash; bail gracefully. This shouldn't
happen often, but we can make no guarantees that previous passes didn't leave
dead code around.
llvm-svn: 229405
Benjamin Kramer [Mon, 16 Feb 2015 16:53:12 +0000 (16:53 +0000)]
Move helper class into an anonymous namespace.
llvm-svn: 229404
Matt Arsenault [Mon, 16 Feb 2015 16:43:13 +0000 (16:43 +0000)]
OpenCL: Accept -cl-strict-aliasing
This was in 1.0, but deprecated in 1.1. Accept it and do nothing
for compatability.
llvm-svn: 229403
Alex Denisov [Mon, 16 Feb 2015 16:17:05 +0000 (16:17 +0000)]
Fix crash when clang tries to build NSNumber literal after forward declaration
Bug report: http://llvm.org/bugs/show_bug.cgi?id=22561
Clang tries to create ObjCBoxedExpression of type 'NSNumber'
when 'NSNumber' has only forward declaration, this cause a crash later,
when 'Sema' refers to a nil QualType of the whole expression.
Please, refer to the bug report for the better explanation.
llvm-svn: 229402
Benjamin Kramer [Mon, 16 Feb 2015 15:43:06 +0000 (15:43 +0000)]
Analyzer: Flatten Checker hierarchy.
We still instantiate all the levels but there's no need to create a vtable for
every level in the hierarchy.
llvm-svn: 229401
Jonas Paulsson [Mon, 16 Feb 2015 15:39:26 +0000 (15:39 +0000)]
[PBQP] Improve the assert for conservatively allocatables.
Remember if the node ever was in this state instead of checking just the
final state.
Reviewed by Arnaud de Grandmaison.
llvm-svn: 229400
Timur Iskhodzhanov [Mon, 16 Feb 2015 15:24:20 +0000 (15:24 +0000)]
[ASan/Win] Add an OOM test
llvm-svn: 229399
Evgeniy Stepanov [Mon, 16 Feb 2015 15:05:14 +0000 (15:05 +0000)]
[msan] Fix UnalignedLoad/UnalignedStore tests.
Add alignment attrubutes to ensure that the tests actually test unaligned
access irrespective of the stack layout.
llvm-svn: 229398
Evgeniy Stepanov [Mon, 16 Feb 2015 14:49:37 +0000 (14:49 +0000)]
[asan] Reuse a common function.
Do not reimplement RoundUpToAlignment.
llvm-svn: 229397
Dmitry Vyukov [Mon, 16 Feb 2015 14:49:34 +0000 (14:49 +0000)]
tsan: remove everything related to rss/background thread in Go mode
In Go mode the background thread is not started (internal_thread_start is empty).
There is no sense in having this code compiled in.
Also removes dependency on sanitizer_linux_libcdep.cc which is good,
ideally Go runtime does not depend on libc at all.
llvm-svn: 229396
Dmitry Vyukov [Mon, 16 Feb 2015 14:35:51 +0000 (14:35 +0000)]
tsan: fix freebsd build
GetTls is not defined in Go mode.
llvm-svn: 229395
Aaron Ballman [Mon, 16 Feb 2015 14:14:01 +0000 (14:14 +0000)]
Reverting a switch from LLVM_DELETED_FUNCTION to = delete; this test should not have changed.
llvm-svn: 229394
Dmitry Vyukov [Mon, 16 Feb 2015 13:54:32 +0000 (13:54 +0000)]
tsan: fix windows build script
add missing source files
+ add -std=c++11 as it is now required to build compiler-rt
llvm-svn: 229393
Dmitry Vyukov [Mon, 16 Feb 2015 13:53:00 +0000 (13:53 +0000)]
tsan: fix compiler warning
mingw gcc complains:
warning: 'err' may be used uninitialized in this function [-Wmaybe-uninitialized]
Printf("Failed to read options from '%s': error %d\n", value, err);
llvm-svn: 229392
Dmitry Vyukov [Mon, 16 Feb 2015 13:52:04 +0000 (13:52 +0000)]
tsan: fix shadow memory mapping on windows
llvm-svn: 229391
Dmitry Vyukov [Mon, 16 Feb 2015 13:51:17 +0000 (13:51 +0000)]
tsan: exclude DumpProcessMap on windows
The function uses EnumProcessModules, which requires psapi.lib,
which is not linked with tsan on windows.
llvm-svn: 229390
Viktor Kutuzov [Mon, 16 Feb 2015 13:30:52 +0000 (13:30 +0000)]
[Msan] Improve the EXPECT_NOT_POISONED() macro to provide the original line number
Differential Revision: http://reviews.llvm.org/D7341
llvm-svn: 229389
Viktor Kutuzov [Mon, 16 Feb 2015 13:26:32 +0000 (13:26 +0000)]
[Msan] Make unit tests that use mempcpy() passing on FreeBSD
Differential Revision: http://reviews.llvm.org/D7588
llvm-svn: 229388
Viktor Kutuzov [Mon, 16 Feb 2015 13:24:21 +0000 (13:24 +0000)]
[Msan] Disable the fgetgrent_r unit test on FreeBSD
Differential Revision: http://reviews.llvm.org/D7343
llvm-svn: 229387
Viktor Kutuzov [Mon, 16 Feb 2015 13:22:07 +0000 (13:22 +0000)]
[Msan] Disable fcvt unit tests on FreeBSD
Differential Revision: http://reviews.llvm.org/D7340
llvm-svn: 229386
Viktor Kutuzov [Mon, 16 Feb 2015 13:19:21 +0000 (13:19 +0000)]
[Msan] Fix the getgrnam_r unit test to pass on FreeBSD
Differential Revision: http://reviews.llvm.org/D7339
llvm-svn: 229385
Viktor Kutuzov [Mon, 16 Feb 2015 13:15:58 +0000 (13:15 +0000)]
[Msan] Fix the sigaction unit test to build on FreeBSD
Differential Revision: http://reviews.llvm.org/D7335
llvm-svn: 229384
Viktor Kutuzov [Mon, 16 Feb 2015 13:13:53 +0000 (13:13 +0000)]
[Msan] Fix the ether unit test to build on FreeBSD
Differential Revision: http://reviews.llvm.org/D7334
llvm-svn: 229383