Philip Reames [Mon, 9 Feb 2015 21:50:31 +0000 (21:50 +0000)]
Minor test cleanup
a) add gc attribute
b) remove unused param
llvm-svn: 228612
Ramkumar Ramachandra [Mon, 9 Feb 2015 21:50:03 +0000 (21:50 +0000)]
MemDerefPrinter: Require DataLayoutPass for higher accuracy
Without a valid data layout, deferenceable(N) doesn't get parsed or
propagated. Since this is the key item we are testing, add a dependency
on the pass.
Differential Revision: http://reviews.llvm.org/D7508
llvm-svn: 228611
Philip Reames [Mon, 9 Feb 2015 21:48:05 +0000 (21:48 +0000)]
Add basic tests for PlaceSafepoints
This is just adding really simple tests which should have been part of the original submission. When doing so, I discovered that I'd mistakenly removed required pieces when preparing the patch for upstream submission. I fixed two such bugs in this submission.
llvm-svn: 228610
Duncan P. N. Exon Smith [Mon, 9 Feb 2015 21:30:05 +0000 (21:30 +0000)]
Verifier: Const-qualify Metadata, NFC
llvm-svn: 228609
Duncan P. N. Exon Smith [Mon, 9 Feb 2015 21:26:34 +0000 (21:26 +0000)]
IR: Document horrible abuse of loose DIDescriptor, NFC
I'll circle back and fix this somehow; for now I just don't want to
forget about it.
llvm-svn: 228608
Duncan P. N. Exon Smith [Mon, 9 Feb 2015 21:23:34 +0000 (21:23 +0000)]
IR: Remove dead code in DITemplate*
These are never referenced or filled in.
llvm-svn: 228607
Ramkumar Ramachandra [Mon, 9 Feb 2015 21:08:03 +0000 (21:08 +0000)]
isDereferenceablePointer: look through gc.relocate calls
While a theoretical GC might change dereferenceability on collection,
there is no such known collector and no need to account for the case
with a flag yet.
Differential Revision: http://reviews.llvm.org/D7454
llvm-svn: 228606
Colin LeMahieu [Mon, 9 Feb 2015 21:07:35 +0000 (21:07 +0000)]
[Hexagon] Removing v2-4 flags. V4 is the minimum supported version.
llvm-svn: 228605
Ben Langmuir [Mon, 9 Feb 2015 20:35:13 +0000 (20:35 +0000)]
Diagnose timeouts in the LockFileManager and delete the dead lock file
If the lock file manager times out, we should give an error rather than
silently trying to load the existing module. And delete the
(presumably) dead lock file, since it will otherwise prevent progress in
future invokations. This is unsound since we have no way to prove that
the lock file we are deleting is the same one we timed out on, but since
the lock is only to avoid excessive rebuilding anyway it should be okay.
Depends on llvm r228603.
llvm-svn: 228604
Ben Langmuir [Mon, 9 Feb 2015 20:34:24 +0000 (20:34 +0000)]
Reduce the LockFileManager timeout, and provide unsafeRemoveLockFile
5 minutes is an eternity, so try to strike a better balance between
waiting long enough for any reasonable module build and not so long that
users kill the process because they think it's hanging.
Also give the client a way to delete the lock file after a timeout.
llvm-svn: 228603
Colin LeMahieu [Mon, 9 Feb 2015 20:33:46 +0000 (20:33 +0000)]
[Hexagon] Factoring classes out of store patterns.
llvm-svn: 228602
Ben Langmuir [Mon, 9 Feb 2015 20:13:11 +0000 (20:13 +0000)]
Update r228592 for when gethostname() returns an error
If gethostname() is not successful, just skip adding the hostname to the
module hash. And don't bother setting hostname[255] = 0, since if
gethostname() is successful, it will be null-terminated already (and if
it's not successful we don't read the string now.
llvm-svn: 228601
Colin LeMahieu [Mon, 9 Feb 2015 20:03:42 +0000 (20:03 +0000)]
[Hexagon] Formatting v5 TD file. Removing commented defs.
llvm-svn: 228598
Ramkumar Ramachandra [Mon, 9 Feb 2015 19:49:54 +0000 (19:49 +0000)]
MemDepPrinter: cleanup a few loops (NFC)
Make use of the newly introduced inst_range to clean up two loops. Clean
up a third one while at it.
Differential Revision: http://reviews.llvm.org/D7455
llvm-svn: 228596
Sanjoy Das [Mon, 9 Feb 2015 19:39:00 +0000 (19:39 +0000)]
Address post-commit review for rL228587: make it explicit that the
<NW> bit of a SCEVAddRecExpr does not depend on the sign of the step
and the start value of the step.
llvm-svn: 228595
Ben Langmuir [Mon, 9 Feb 2015 19:30:29 +0000 (19:30 +0000)]
Add missing include from r228592
llvm-svn: 228594
Colin LeMahieu [Mon, 9 Feb 2015 19:24:44 +0000 (19:24 +0000)]
[Hexagon] Cleaning up definition formatting.
llvm-svn: 228593
Ben Langmuir [Mon, 9 Feb 2015 19:23:08 +0000 (19:23 +0000)]
Add the hostname to the module hash to avoid sharing between hosts
Sharing between hosts will cause problems for the LockFileManager, which
can timeout waiting for a process that has already died.
llvm-svn: 228592
David Blaikie [Mon, 9 Feb 2015 19:13:51 +0000 (19:13 +0000)]
DebugInfo: Refactor default arg handling into a common place (instead of handling in repeatedly for aggregate, complex, and scalar types)
llvm-svn: 228591
Zachary Turner [Mon, 9 Feb 2015 19:13:46 +0000 (19:13 +0000)]
Dont' use O_CLOEXEC on Windows, since it doesn't exist.
llvm-svn: 228590
David Blaikie [Mon, 9 Feb 2015 18:55:57 +0000 (18:55 +0000)]
DebugInfo: Suppress the location of instructions in complex default arguments.
llvm-svn: 228589
David Blaikie [Mon, 9 Feb 2015 18:47:14 +0000 (18:47 +0000)]
DebugInfo: Suppress the location of instructions in aggregate default arguments.
Matches the existing code for scalar default arguments. Complex default
arguments probably need the same handling too (test/fix to that coming
next).
llvm-svn: 228588
Sanjoy Das [Mon, 9 Feb 2015 18:44:42 +0000 (18:44 +0000)]
Clarify the wording on what it means for a SCEVAddRecExpr to be <NW>.
llvm-svn: 228587
Sanjoy Das [Mon, 9 Feb 2015 18:34:55 +0000 (18:34 +0000)]
Bugfix: SCEV incorrectly marks certain add recurrences as nsw
When creating a scev for sext({X,+,Y}), scev checks if the expression
is equivalent to {sext X,+,zext Y}. If it can prove that, it also
tags the original {X,+,Y} as <nsw>, which is not correct.
In the test case I run `-scalar-evolution` twice because the bug
manifests only once SCEV has run through and seen the `sext`
expressions (and then does a in-place mutation on {X,+,Y}).
Differential Revision: http://reviews.llvm.org/D7495
llvm-svn: 228586
Lang Hames [Mon, 9 Feb 2015 18:16:43 +0000 (18:16 +0000)]
[Orc] Revert r228567 (GCC ICE workaround) - it doesn't seem to have helped.
As far as I can tell r228568 was the right workaround, and r228567 was
unnecessary. If reverting this causes problems on the bots I'll reinstate it.
llvm-svn: 228585
Hafiz Abid Qadeer [Mon, 9 Feb 2015 18:14:01 +0000 (18:14 +0000)]
Fix MI notification test case on Linux.
This test case was checking for a specific stop reason which is different on
Linux. This caused the test to fail. It now only checks for stoppped. Also added
some more steps to run to main so that we dont pass when application has run to
completion.
llvm-svn: 228584
Samuel Benzaquen [Mon, 9 Feb 2015 17:50:40 +0000 (17:50 +0000)]
Verify assign operator signatures.
Summary: Warn when the return type of assign operators is not Class&.
Reviewers: alexfh
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D6667
llvm-svn: 228583
Pavel Labath [Mon, 9 Feb 2015 17:42:47 +0000 (17:42 +0000)]
Fix TestFdLeak.py on Mac.
bug introduced in D7466. For some reason target.Launch behaves differently on linux and mac.
llvm-svn: 228582
Sanjay Patel [Mon, 9 Feb 2015 17:17:09 +0000 (17:17 +0000)]
fixed to test features, not CPUs
llvm-svn: 228581
Kit Barton [Mon, 9 Feb 2015 17:03:18 +0000 (17:03 +0000)]
This change implements the following three logical vector operations:
veqv (vector equivalence)
vnand
vorc
I increased the AddedComplexity for these instructions to 500 to ensure they are generated instead of issuing other VSX instructions.
Phabricator review: http://reviews.llvm.org/D7469
llvm-svn: 228580
Sanjay Patel [Mon, 9 Feb 2015 16:30:58 +0000 (16:30 +0000)]
rename variable to give it some meaning; remove obvious comments; NFC
llvm-svn: 228579
Sanjay Patel [Mon, 9 Feb 2015 16:04:52 +0000 (16:04 +0000)]
fix comment that didn't match the code; remove unnecessary braces; NFC
llvm-svn: 228578
Hafiz Abid Qadeer [Mon, 9 Feb 2015 14:34:12 +0000 (14:34 +0000)]
Fix test case for data-disassemble instruction in lldb-mi.
Previously the offset field showed the offset from the section base.
I have fixed it so that first disassembled instruction has offset of 0.
Also made a little modification in the test case to match the output coming
form the lldb-mi.
llvm-svn: 228577
Hafiz Abid Qadeer [Mon, 9 Feb 2015 13:54:51 +0000 (13:54 +0000)]
Fix test case failure on Linux.
The test case were failing becuase my test compiler was gcc. The generated
code behaved a bit differently to the how the test expected. Adjusted a few
lines so that it works on both gcc and clang.
llvm-svn: 228576
Tobias Grosser [Mon, 9 Feb 2015 13:52:21 +0000 (13:52 +0000)]
isl is now distributed with polly
llvm-svn: 228575
Ilia K [Mon, 9 Feb 2015 13:18:24 +0000 (13:18 +0000)]
Remove forgotten file test/tools/lldb-mi/TestMiProgramArgs.py after r228286
llvm-svn: 228574
Timur Iskhodzhanov [Mon, 9 Feb 2015 12:47:51 +0000 (12:47 +0000)]
[ASan/Win] Add a test case for PR22431
llvm-svn: 228573
Johannes Doerfert [Mon, 9 Feb 2015 12:34:23 +0000 (12:34 +0000)]
Allow ScalarEvolution to catch more min/max cases
For the attached test case different types are used in the ICmpInst
and SelectInst that represent the min/max expressions. However, if the
ICmpInst type is smaller a comparison with the sign/zero extended
operands would have yielded the same result. This situation might
arise after the instruction combination pass was applied.
Differential Revision: http://reviews.llvm.org/D7338
llvm-svn: 228572
Benjamin Kramer [Mon, 9 Feb 2015 11:48:43 +0000 (11:48 +0000)]
Update cxx_status to list features implemented in Clang 3.6.
Still yellow because 3.6 is unreleased. While there make Urbana paper
links clickable and list binary literals as available in Clang 2.9
(they've been available basically since the dawn of Clang, but not
having a version number in the table looks weird)
llvm-svn: 228571
Pavel Labath [Mon, 9 Feb 2015 11:37:56 +0000 (11:37 +0000)]
Fix descriptor leak in multi-target debugging
Summary:
When debugging two targets concurrently, the pseude terminal master fd from the first one would
leak into the second. This fixes the problem by setting O_CLOEXEC on the master fd. Test
included.
Reviewers: clayborg, vharron
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D7466
llvm-svn: 228570
Lang Hames [Mon, 9 Feb 2015 07:47:32 +0000 (07:47 +0000)]
[Orc] Try another workaround for the GCC 4.7.2 ICE introduced in r228557. NFC.
llvm-svn: 228568
Lang Hames [Mon, 9 Feb 2015 07:22:56 +0000 (07:22 +0000)]
[Orc] Tweak lambda capture lists to try to avoid an ICE on gcc-4.7.2. NFC.
Apparently gcc-4.7.2 is touchy about 'this' appearing in a lambda capture list
along with other captures. I've rewritten my captures to try to avoid the issue.
llvm-svn: 228567
Akira Hatanaka [Mon, 9 Feb 2015 06:38:23 +0000 (06:38 +0000)]
Fix a bug in DemoteRegToStack where a reload instruction was inserted into the
wrong basic block.
This would happen when the result of an invoke was used by a phi instruction
in the invoke's normal destination block. An instruction to reload the invoke's
value would get inserted before the critical edge was split and a new basic
block (which is the correct insertion point for the reload) was created. This
commit fixes the bug by splitting the critical edge before all the reload
instructions are inserted.
Also, hoist up the code which computes the insertion point to the only place
that need that computation.
rdar://problem/
15978721
llvm-svn: 228566
David Majnemer [Mon, 9 Feb 2015 06:31:31 +0000 (06:31 +0000)]
MC: Calculate intra-section symbol differences correctly for COFF
This fixes PR22060.
llvm-svn: 228565
Lang Hames [Mon, 9 Feb 2015 04:46:41 +0000 (04:46 +0000)]
[Orc] Fix the MSVC bots by using LLVM_EXPLICIT rather than explicit.
llvm-svn: 228564
Craig Topper [Mon, 9 Feb 2015 04:04:53 +0000 (04:04 +0000)]
[X86] Remove 256-bit and 512-bit memop pattern fragments. They are no longer used.
llvm-svn: 228563
Craig Topper [Mon, 9 Feb 2015 04:04:50 +0000 (04:04 +0000)]
[X86] Remove 'memop' uses from AVX512. Use 'load' instead.
llvm-svn: 228562
Tim Northover [Mon, 9 Feb 2015 01:21:00 +0000 (01:21 +0000)]
DeadArgElim: fix mismatch in accounting of array return types.
Some parts of DeadArgElim were only considering the individual fields
of StructTypes separately, but others (where insertvalue &
extractvalue instructions occur) also looked into ArrayTypes.
This one is an actual bug; the mismatch can lead to an argument being
considered used by a return sub-value that isn't being tracked (and
hence is dead by default). It then gets incorrectly eliminated.
llvm-svn: 228559
Tim Northover [Mon, 9 Feb 2015 01:20:53 +0000 (01:20 +0000)]
DeadArgElim: assess uses of entire return value aggregate.
Previously, a non-extractvalue use of an aggregate return value meant
the entire return was considered live (the algorithm gave up
entirely). This was correct, but conservative. It's better to actually
look at that Use, making the analysis results apply to all sub-values
under consideration.
E.g.
%val = call { i32, i32 } @whatever()
[...]
ret { i32, i32 } %val
The return is using the entire aggregate (sub-values 0 and 1). We can
still simplify @whatever if we can prove that this return is itself
unused.
Also unifies the logic slightly between aggregate and non-aggregate
cases..
llvm-svn: 228558
Lang Hames [Mon, 9 Feb 2015 01:20:51 +0000 (01:20 +0000)]
[Orc] Add a JITSymbol class to the Orc APIs, refactor APIs, update clients.
This patch refactors a key piece of the Orc APIs: It removes the
*::getSymbolAddress and *::lookupSymbolAddressIn methods, which returned target
addresses (uint64_ts), and replaces them with *::findSymbol and *::findSymbolIn
respectively, which return instances of the new JITSymbol type. Unlike the old
methods, calling findSymbol or findSymbolIn does not cause the symbol to be
immediately materialized when found. Instead, the symbol will be materialized
if/when the getAddress method is called on the returned JITSymbol. This allows
us to query for the existence of symbols without actually materializing them. In
the future I expect more information to be attached to the JITSymbol class, for
example whether the returned symbol is a weak or strong definition. This will
allow us to properly handle weak symbols and multiple definitions.
llvm-svn: 228557
Ramkumar Ramachandra [Mon, 9 Feb 2015 01:13:13 +0000 (01:13 +0000)]
InstCombine: propagate nonNull through assume
Make assume (load (call|invoke) != null) set nonNull return attribute
for the call and invoke. Also include tests.
Differential Revision: http://reviews.llvm.org/D7107
llvm-svn: 228556
Ramkumar Ramachandra [Mon, 9 Feb 2015 00:30:03 +0000 (00:30 +0000)]
[emacs] Get llvm-mode to font-lock "personality"
Differential Revision: http://reviews.llvm.org/D7494
llvm-svn: 228555
David Blaikie [Sun, 8 Feb 2015 23:15:37 +0000 (23:15 +0000)]
Fix -Wuninitialized build by referencing the relevant ctor parameter instead of the base class member variable.
llvm-svn: 228554
Zachary Turner [Sun, 8 Feb 2015 22:53:53 +0000 (22:53 +0000)]
Make PDBSymbol's IPDBSymbol reference const.
llvm-svn: 228553
Sanjoy Das [Sun, 8 Feb 2015 22:52:17 +0000 (22:52 +0000)]
Bugfix: ScalarEvolution incorrectly assumes that the start of certain
add recurrences don't overflow.
This change makes the optimization more restrictive. It still assumes
that an overflowing `add nsw` is undefined behavior; and this change
will need revisiting once we have a consistent semantics for poison
values.
Differential Revision: http://reviews.llvm.org/D7331
llvm-svn: 228552
Craig Topper [Sun, 8 Feb 2015 22:38:25 +0000 (22:38 +0000)]
[X86] Remove the remaining uses of memop from AVX and AVX2 instruction patterns. AVX and AVX2 can handle unaligned loads being folded so we can just use 'load'
llvm-svn: 228551
Benjamin Kramer [Sun, 8 Feb 2015 21:56:09 +0000 (21:56 +0000)]
Metadata: Use <algorithm> to simplify code. NFC.
llvm-svn: 228550
Justin Hibbits [Sun, 8 Feb 2015 21:34:29 +0000 (21:34 +0000)]
Fix sorting. Spotted by emaste.
llvm-svn: 228549
Justin Hibbits [Sun, 8 Feb 2015 21:23:27 +0000 (21:23 +0000)]
PowerPC64 host also supports 32-bit binaries, so note it.
llvm-svn: 228548
Justin Hibbits [Sun, 8 Feb 2015 21:23:23 +0000 (21:23 +0000)]
Fix off-by-one IsGPR().
f0 was being counted as a GPR, due to the check in IsGPR(). Correct it by
looking at the precise GPR range.
llvm-svn: 228547
Sanjay Patel [Sun, 8 Feb 2015 21:14:27 +0000 (21:14 +0000)]
fix test attributes; this is an SSE2 test, not a Nehalem test
llvm-svn: 228546
Sanjay Patel [Sun, 8 Feb 2015 21:10:40 +0000 (21:10 +0000)]
fix test attributes; this is an x86-64 test, not a Nehalem test
llvm-svn: 228545
Sanjay Patel [Sun, 8 Feb 2015 21:05:03 +0000 (21:05 +0000)]
fix test attributes; these are SSE2 tests, not Nehalem tests
llvm-svn: 228544
David Blaikie [Sun, 8 Feb 2015 21:03:30 +0000 (21:03 +0000)]
Kaleidoscope-Orc: Reuse the IRGen utility function in later chapters, and remove an unused parameter.
llvm-svn: 228543
Zachary Turner [Sun, 8 Feb 2015 20:58:09 +0000 (20:58 +0000)]
DebugInfoPDB: Make the symbol base case hold an IPDBSession ref.
Dumping a symbol often requires access to data that isn't inside
the symbol hierarchy, but which is only accessible through the
top-level session. This patch is a pure interface change to give
symbols a reference to the session.
llvm-svn: 228542
Sanjay Patel [Sun, 8 Feb 2015 20:50:58 +0000 (20:50 +0000)]
fix test attributes; these are SSE2 tests, not Nehalem tests
llvm-svn: 228541
Johannes Doerfert [Sun, 8 Feb 2015 20:50:42 +0000 (20:50 +0000)]
[Refactor] Use the LoopInfo object already present
llvm-svn: 228540
David Blaikie [Sun, 8 Feb 2015 20:29:28 +0000 (20:29 +0000)]
Kaleidoscope-Orc: Extract IRGen work into a utility function.
llvm-svn: 228539
Hafiz Abid Qadeer [Sun, 8 Feb 2015 20:21:08 +0000 (20:21 +0000)]
Fix a handling of full path in break-insert.
For some time, eclipse (CDT) uses full path of the file in break-insert command
when putting breakpoint on a source line. On windows, a typical command looks
like the following.
56-break-insert -f F:\\work\\ws\\test\\main.c:49
Current implementation in lldb-mi have problem in 2 ways.
1. It was assuming that there will be only one : in the path which is wrong if full
path is supplied.
2. CDT sends out path with double backslashes in windows which gives error on
resolution.
Fixed the : issue in lldb-mi. Changed FileSpec::Normalize to make sure that it
handles the path with \\ correctly. Added test cases to check for full path in
both lldb-mi and lldb. Also added a test case to check SBFileSpec with double
slashes.
llvm-svn: 228538
David Blaikie [Sun, 8 Feb 2015 20:15:01 +0000 (20:15 +0000)]
Constify the Orc Kaleidoscope examples IRGen functions.
llvm-svn: 228537
Sanjay Patel [Sun, 8 Feb 2015 20:05:53 +0000 (20:05 +0000)]
fix test attributes; these are x86-64 tests, not Nehalem tests
llvm-svn: 228536
Sanjay Patel [Sun, 8 Feb 2015 20:01:12 +0000 (20:01 +0000)]
fix test attributes; these are MMX tests, not Nehalem tests
llvm-svn: 228535
Sanjay Patel [Sun, 8 Feb 2015 19:50:55 +0000 (19:50 +0000)]
fix test attributes; these are SSE2 tests, not Nehalem tests
llvm-svn: 228534
Davide Italiano [Sun, 8 Feb 2015 19:42:15 +0000 (19:42 +0000)]
[ELF] Implement --strip-all/-s
Differential Revision: D7489
Reviewed by: shankarke
llvm-svn: 228533
Sanjay Patel [Sun, 8 Feb 2015 19:38:25 +0000 (19:38 +0000)]
generalize test; nothing Nehalem-specific here
llvm-svn: 228532
Lang Hames [Sun, 8 Feb 2015 19:15:33 +0000 (19:15 +0000)]
[Orc][Kaleidoscope] Build Kaleidoscope/Orc tutorials with warnings.
llvm-svn: 228531
Lang Hames [Sun, 8 Feb 2015 19:14:56 +0000 (19:14 +0000)]
[Orc][Kaleidoscope] Remove fixed sized buffers from string conversion code and
further c++ify the Kaleidoscope/Orc tutorials.
llvm-svn: 228530
Sanjay Patel [Sun, 8 Feb 2015 18:54:22 +0000 (18:54 +0000)]
fix typos; NFC
llvm-svn: 228529
Simon Pilgrim [Sun, 8 Feb 2015 18:33:13 +0000 (18:33 +0000)]
[X86][AVX2] AVX2 broadcast + permute memory folding tests.
llvm-svn: 228528
Zachary Turner [Sun, 8 Feb 2015 18:08:51 +0000 (18:08 +0000)]
Make UTF8->UTF16 conversion null terminate output on empty input.
llvm-svn: 228527
Simon Pilgrim [Sun, 8 Feb 2015 17:13:54 +0000 (17:13 +0000)]
Moved AVX2 vbroadcast (reg) instruction foldings under the correct grouping. NFC.
llvm-svn: 228526
Bjorn Steinbrink [Sun, 8 Feb 2015 17:07:14 +0000 (17:07 +0000)]
Correctly combine alias.scope metadata by a union instead of intersecting
Summary:
The alias.scope metadata represents sets of things an instruction might
alias with. When generically combining the metadata from two
instructions the result must be the union of the original sets, because
the new instruction might alias with anything any of the original
instructions aliased with.
Reviewers: hfinkel
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7490
llvm-svn: 228525
NAKAMURA Takumi [Sun, 8 Feb 2015 11:15:08 +0000 (11:15 +0000)]
[CMake] Kaleidoscope-Orc: Update libdeps.
llvm-svn: 228524
David Majnemer [Sun, 8 Feb 2015 10:55:14 +0000 (10:55 +0000)]
Sema: Don't give attribute alias vars with struct type an init expr
We'd give the VarDecl a CXXConstructExpr even though it is annotated
with an alias attribute. This would make us trip over sanity checking
asserts.
This fixes PR22493.
llvm-svn: 228523
Daniel Jasper [Sun, 8 Feb 2015 09:34:49 +0000 (09:34 +0000)]
clang-format: Correctly mark preprocessor lines in child blocks.
This prevents contracting:
auto lambda = []() {
int a = 2
#if A
+ 2
#endif
;
};
into:
auto lambda = []() { int a = 2
#if A + 2
#endif ; };
Which is obviously BAD.
This fixes llvm.org/PR22496.
llvm-svn: 228522
Elena Demikhovsky [Sun, 8 Feb 2015 08:27:19 +0000 (08:27 +0000)]
Masked Gather and Scatter Intrinsics.
Gather and Scatter are new introduced intrinsics, comming after recently implemented masked load and store.
This is the first patch for Gather and Scatter intrinsics. It includes only the syntax, parsing and verification.
Gather and Scatter intrinsics allow to perform multiple memory accesses (read/write) in one vector instruction.
The intrinsics are not target specific and will have the following syntax:
Gather:
declare <16 x i32> @llvm.masked.gather.v16i32(<16 x i32*> <vector of ptrs>, i32 <alignment>, <16 x i1> <mask>, <16 x i32> <passthru>)
declare <8 x float> @llvm.masked.gather.v8f32(<8 x float*><vector of ptrs>, i32 <alignment>, <8 x i1> <mask>, <8 x float><passthru>)
Scatter:
declare void @llvm.masked.scatter.v8i32(<8 x i32><vector value to be stored> , <8 x i32*><vector of ptrs> , i32 <alignment>, <8 x i1> <mask>)
declare void @llvm.masked.scatter.v16i32(<16 x i32> <vector value to be stored> , <16 x i32*> <vector of ptrs>, i32 <alignment>, <16 x i1><mask> )
Vector of ptrs - a set of source/destination addresses, to load/store the value.
Mask - switches on/off vector lanes to prevent memory access for switched-off lanes
vector of ptrs, value and mask should have the same vector width.
These are code examples where gather / scatter should be used and will allow function vectorization
;void foo1(int * restrict A, int * restrict B, int * restrict C) {
; for (int i=0; i<SIZE; i++) {
; A[i] = B[C[i]];
; }
;}
;void foo3(int * restrict A, int * restrict B) {
; for (int i=0; i<SIZE; i++) {
; A[B[i]] = i+5;
; }
;}
Tests will come in the following patches, with CodeGen and Vectorizer.
http://reviews.llvm.org/D7433
llvm-svn: 228521
David Blaikie [Sun, 8 Feb 2015 07:20:04 +0000 (07:20 +0000)]
Add CMake build support for Orc examples (& fix some clang -Werror build
breaks due to unused variables).
llvm-svn: 228520
Lang Hames [Sun, 8 Feb 2015 04:34:13 +0000 (04:34 +0000)]
[Orc][Kaleidoscope] Fix method-name think-o. NFC.
llvm-svn: 228519
Tim Northover [Sun, 8 Feb 2015 00:50:47 +0000 (00:50 +0000)]
ARM & AArch64: teach LowerVSETCC that output type size may differ from input.
While various DAG combines try to guarantee that a vector SETCC
operation will have the same output size as input, there's nothing
intrinsic to either creation or LegalizeTypes that actually guarantees
it, so the function needs to be ready to handle a mismatch.
Fortunately this is easy enough, just extend or truncate the naturally
compared result.
I couldn't reproduce the failure in other backends that I know have
SIMD, so it's probably only an issue for these two due to shared
heritage.
Should fix PR21645.
llvm-svn: 228518
Zachary Turner [Sun, 8 Feb 2015 00:41:31 +0000 (00:41 +0000)]
Removed unused function mistakenly left in, triggering -Werror.
llvm-svn: 228517
Zachary Turner [Sun, 8 Feb 2015 00:29:29 +0000 (00:29 +0000)]
Some cleanup for libpdb.
This patch implements a few of the optional suggestions from the
initial patch comitting libpdb. In particular, it implements a
virtual function out of line for each of the concrete classes.
A few other minor cleanups exist as well, such as using override
instead of virtual, etc.
llvm-svn: 228516
Craig Topper [Sat, 7 Feb 2015 23:36:51 +0000 (23:36 +0000)]
[X86] Add register use/def for wrmsr and rdmsr.
llvm-svn: 228515
Craig Topper [Sat, 7 Feb 2015 23:36:36 +0000 (23:36 +0000)]
[X86] Add GETSEC instruction.
llvm-svn: 228514
Simon Pilgrim [Sat, 7 Feb 2015 23:28:16 +0000 (23:28 +0000)]
[X86][AVX2] AVX2 integer stack folding tests.
This adds tests for the remaining AVX2 instructions that currently support memory folding.
llvm-svn: 228513
David Blaikie [Sat, 7 Feb 2015 23:23:43 +0000 (23:23 +0000)]
Rename the 'Extending the Language: Debug Information' to 'Adding Debug Information' since this isn't actually modifying/extending the language.
llvm-svn: 228512
Yaron Keren [Sat, 7 Feb 2015 22:16:16 +0000 (22:16 +0000)]
Replace DeclContext::getNextContext with DeclContext::collectAllContexts
in the Clang CFE Internals Manual (done in r147729).
llvm-svn: 228510
Simon Pilgrim [Sat, 7 Feb 2015 21:44:06 +0000 (21:44 +0000)]
[X86][AVX] Added missing stack folding support + test for vptest ymm instruction
llvm-svn: 228509
Benjamin Kramer [Sat, 7 Feb 2015 21:37:08 +0000 (21:37 +0000)]
LoopIdiom: Use utility functions.
The only difference between deleteIfDeadInstruction and
RecursivelyDeleteTriviallyDeadInstructions is that the former also
manually invalidates SCEV. That's unnecessary because SCEV automatically
gets informed when an instruction is deleted via a ValueHandle. NFC.
llvm-svn: 228508
Joerg Sonnenberger [Sat, 7 Feb 2015 21:24:06 +0000 (21:24 +0000)]
Avoid integer overflows around realloc calls resulting in potential
heap. Problem identified by Guido Vranken. Changes differ from original
OpenBSD sources by not depending on non-portable reallocarray.
llvm-svn: 228507
Simon Pilgrim [Sat, 7 Feb 2015 21:20:11 +0000 (21:20 +0000)]
[X86][SSE] Added missing stack folding tests for (v)mpsadbw instruction
llvm-svn: 228506