Duncan P. N. Exon Smith [Tue, 20 Jan 2015 00:58:46 +0000 (00:58 +0000)]
IR: Canonicalize GenericDwarfNode empty headers to null
llvm-svn: 226532
Duncan P. N. Exon Smith [Tue, 20 Jan 2015 00:57:33 +0000 (00:57 +0000)]
IR: Detect whether to call recalculateHash() via SFINAE, NFC
Rather than relying on updating switch statements correctly, detect
whether `setHash()` exists in the subclass. If so, call
`recalculateHash()` and `setHash(0)` appropriately.
llvm-svn: 226531
Greg Clayton [Tue, 20 Jan 2015 00:04:26 +0000 (00:04 +0000)]
Added an Xcode target so we build the "lldb-mi" executable as part of the "desktop" and "desktop no xpc" targets.
Include paths were switched to be user include paths, if this breaks the linux build we will need to fix the Makefiles/cmake stuff.
<rdar://problem/
19198581>
llvm-svn: 226530
Duncan P. N. Exon Smith [Tue, 20 Jan 2015 00:01:43 +0000 (00:01 +0000)]
IR: Introduce GenericDwarfNode
As part of PR22235, introduce `DwarfNode` and `GenericDwarfNode`. The
former is a metadata node with a DWARF tag. The latter matches our
current (generic) schema of a header with string (and stringified
integer) data and an arbitrary number of operands.
This doesn't move it into place yet; that change will require a large
number of testcase updates.
llvm-svn: 226529
Jim Ingham [Mon, 19 Jan 2015 23:51:51 +0000 (23:51 +0000)]
Fix a race condition where you could set the selected thread & target in the
CommandInterpreter's execution context AFTER the process had started running
and before it initially stopped. Also fixed one test case that was implicitly
using this (and an abuse of the async mode) to accidentally succeed.
<rdar://problem/
16814726>
llvm-svn: 226528
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 23:44:41 +0000 (23:44 +0000)]
AsmParser: Abstract more of MDLocation parser, NFC
llvm-svn: 226527
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 23:39:32 +0000 (23:39 +0000)]
AsmParser: Split up ParseMDFieldsImpl(), NFC
llvm-svn: 226526
Frederic Riss [Mon, 19 Jan 2015 23:33:14 +0000 (23:33 +0000)]
[dsymutil] Add the detected target triple to the debug map.
It will be needed to instantiate the Target object that we will
use to create all the MC objects for the dwarf emission.
llvm-svn: 226525
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 23:32:36 +0000 (23:32 +0000)]
AsmParser: Fix error location for missing fields
llvm-svn: 226524
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 23:18:34 +0000 (23:18 +0000)]
IR: Cleanup MDNode field use, NFC
Swap usage of `SubclassData32` and `MDNodeSubclassData`, and rename
`MDNodeSubclassData` to `NumUnresolved`. Small drive-by cleanup to
`countUnresolvedOperands()` since otherwise the name clash with local
vars named `NumUnresolved` would be confusing.
llvm-svn: 226523
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 23:17:09 +0000 (23:17 +0000)]
IR: Move replaceWithUniqued(), etc., to source file, NFC
llvm-svn: 226522
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 23:15:21 +0000 (23:15 +0000)]
IR: Cleanup MDNode::MDNode(), NFC
llvm-svn: 226521
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 23:13:14 +0000 (23:13 +0000)]
IR: Merge UniquableMDNode back into MDNode, NFC
As pointed out in r226501, the distinction between `MDNode` and
`UniquableMDNode` is confusing. When we need subclasses of `MDNode`
that don't use all its functionality it might make sense to break it
apart again, but until then this makes the code clearer.
llvm-svn: 226520
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 22:53:18 +0000 (22:53 +0000)]
IR: Extract MDNodeOpsKey, NFC
Make the MDTuple operand hashing logic reusable.
llvm-svn: 226519
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 22:52:07 +0000 (22:52 +0000)]
IR: Simplify uniquifyImpl(), NFC
llvm-svn: 226518
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 22:47:08 +0000 (22:47 +0000)]
IR: Simplify erasing from uniquing store, NFC
llvm-svn: 226517
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 22:45:41 +0000 (22:45 +0000)]
Remove dead code, NFC
llvm-svn: 226516
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 22:44:32 +0000 (22:44 +0000)]
Utils: Simplify MapMetadata(), NFC
Extract out the operand remapping loops, which are now very similar.
llvm-svn: 226515
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 22:41:14 +0000 (22:41 +0000)]
Skip upcast, NFC
llvm-svn: 226514
Simon Pilgrim [Mon, 19 Jan 2015 22:40:45 +0000 (22:40 +0000)]
[X86][AVX] Missing AVX1 memory folding float instructions
Now that we can create much more exhaustive X86 memory folding tests, this patch adds the missing AVX1/F16C floating point instruction stack foldings we can easily test for including the scalar intrinsics (add, div, max, min, mul, sub), conversions float/int to double, half precision conversions, rounding, dot product and bit test. The patch also adds a couple of obviously missing SSE instructions (more to follow once we have full SSE testing).
Now that scalar folding is working it broke a very old test (2006-10-07-ScalarSSEMiscompile.ll) - this test appears to make no sense as its trying to ensure that a scalar subtraction isn't folded as it 'would zero the top elts of the loaded vector' - this test just appears to be wrong to me.
Differential Revision: http://reviews.llvm.org/D7055
llvm-svn: 226513
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 22:40:25 +0000 (22:40 +0000)]
Fix whitespace, NFC
llvm-svn: 226512
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 22:39:07 +0000 (22:39 +0000)]
Utils: Simplify MapMetadata(), NFC
Take advantage of the new ability of temporary nodes to mutate to
distinct and uniqued nodes to greatly simplify the `MapMetadata()`
helper functions.
llvm-svn: 226511
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 22:24:52 +0000 (22:24 +0000)]
IR: Allow temporary nodes to become uniqued or distinct
Add `MDNode::replaceWithUniqued()` and `MDNode::replaceWithDistinct()`,
which mutate temporary nodes to become uniqued or distinct. On uniquing
collisions, the unique version is returned and the node is deleted.
This takes advantage of temporary nodes being folded back in, and should
let me clean up some awkward logic in `MapMetadata()`.
llvm-svn: 226510
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 22:21:15 +0000 (22:21 +0000)]
IR: Remove templates from TempMDNodeDeleter, NFC
r226504 added `TempMDNodeDeleter` to help with `std::unique_ptr<>`-izing
the `MDNode::getTemporary()` interface. It doesn't need to be
templated, though.
llvm-svn: 226509
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 22:18:29 +0000 (22:18 +0000)]
IR: Split out countUnresolvedOperands(), NFC
llvm-svn: 226508
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 22:16:01 +0000 (22:16 +0000)]
Cleanup whitespace, NFC
llvm-svn: 226507
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 21:31:48 +0000 (21:31 +0000)]
CodeGen: Update IRBuilder for LLVM API change
`MDNode::getTemporary()` returns a `unique_ptr<>` as of r226504.
llvm-svn: 226506
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 21:30:48 +0000 (21:30 +0000)]
CodeGen: Update LoopAttributes for LLVM API change
`MDNode::getTemporary()` returns a `unique_ptr<>` as of r226504.
llvm-svn: 226505
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 21:30:18 +0000 (21:30 +0000)]
IR: Return unique_ptr from MDNode::getTemporary()
Change `MDTuple::getTemporary()` and `MDLocation::getTemporary()` to
return (effectively) `std::unique_ptr<T, MDNode::deleteTemporary>`, and
clean up call sites. (For now, `DIBuilder` call sites just call
`release()` immediately.)
There's an accompanying change in each of clang and polly to use the new
API.
llvm-svn: 226504
Rafael Espindola [Mon, 19 Jan 2015 21:11:14 +0000 (21:11 +0000)]
Add r224985 back with fixes.
The fixes are to note that AArch64 has additional restrictions on when local
relocations can be used. In particular, ld64 requires that relocations to
cstring/cfstrings use linker visible symbols.
Original message:
In an assembly expression like
bar:
.long L0 + 1
the intended semantics is that bar will contain a pointer one byte past L0.
In sections that are merged by content (strings, 4 byte constants, etc), a
single position in the section doesn't give the linker enough information.
For example, it would not be able to tell a relocation must point to the
end of a string, since that would look just like the start of the next.
The solution used in ELF to use relocation with symbols if there is a non-zero
addend.
In MachO before this patch we would just keep all symbols in some sections.
This would miss some cases (only cstrings on x86_64 were implemented) and was
inefficient since most relocations have an addend of 0 and can be represented
without the symbol.
This patch implements the non-zero addend logic for MachO too.
llvm-svn: 226503
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 20:37:44 +0000 (20:37 +0000)]
IR: Add MDLocation::getTemporary()
llvm-svn: 226502
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 20:36:39 +0000 (20:36 +0000)]
IR: Remove MDNodeFwdDecl
Remove `MDNodeFwdDecl` (as promised in r226481). Aside from API
changes, there's no real functionality change here.
`MDNode::getTemporary()` now forwards to `MDTuple::getTemporary()`,
which returns a tuple with `isTemporary()` equal to true.
The main point is that we can now add temporaries of other `MDNode`
subclasses, needed for PR22235 (I introduced `MDNodeFwdDecl` in the
first place because I didn't recognize this need, and thought they were
only needed to handle forward references).
A few things left out of (or highlighted by) this commit:
- I've had to remove the (few) uses of `std::unique_ptr<>` to deal
with temporaries, since the destructor is no longer public.
`getTemporary()` should probably return the equivalent of
`std::unique_ptr<T, MDNode::deleteTemporary>`.
- `MDLocation::getTemporary()` doesn't exist yet (worse, it actually
does exist, but does the wrong thing: `MDNode::getTemporary()` is
inherited and returns an `MDTuple`).
- `MDNode` now only has one subclass, `UniquableMDNode`, and the
distinction between them is actually somewhat confusing.
I'll fix those up next.
llvm-svn: 226501
Colin LeMahieu [Mon, 19 Jan 2015 20:31:18 +0000 (20:31 +0000)]
[Hexagon] Updating muxir/ri/ii intrinsics. Setting predicate registers as compatible with i32 rather than doing custom type conversion.
llvm-svn: 226500
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 20:18:13 +0000 (20:18 +0000)]
IR: Extract out and reuse `storeImpl()`, NFC
llvm-svn: 226499
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 20:16:50 +0000 (20:16 +0000)]
IR: Extract out getUniqued(), NFC
llvm-svn: 226498
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 20:14:15 +0000 (20:14 +0000)]
IR: Reuse `getImpl()` for `getDistinct()`, NFC
Merge `getDistinct()`'s implementation with those of `get()` and
`getIfExists()` for both `MDTuple` and `MDLocation`. This will make it
easier to scale to supporting temporaries.
llvm-svn: 226497
Adam Nemet [Mon, 19 Jan 2015 20:12:05 +0000 (20:12 +0000)]
[AVX512] Add sub-vector FP extracts
Analogous to AVX2, these need to be implemented as macros to properly
propagate the immediate index operand.
Part of <rdar://problem/
17688758>
llvm-svn: 226496
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 19:35:21 +0000 (19:35 +0000)]
IR: Move replaceAllUsesWith() back up to MDNode
Move `MDNodeFwdDecl::replaceAllUsesWith()` back up to `MDNode`, but
assert `isTemporary()`.
llvm-svn: 226495
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 19:32:27 +0000 (19:32 +0000)]
IR: Be specific about what MDNode::get() returns, NFC
llvm-svn: 226494
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 19:31:09 +0000 (19:31 +0000)]
Remove dead code, NFC
llvm-svn: 226493
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 19:29:25 +0000 (19:29 +0000)]
IR: Simplify MDNode::setOperand(), NFC
llvm-svn: 226492
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 19:28:28 +0000 (19:28 +0000)]
IR: Simplify handleChangedOperand() fast path, NFC
Use `isUniqued()` instead of `isStoredDistinctInContext()`, and remove
an assertion that won't be valid once temporaries are merged back in.
llvm-svn: 226491
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 19:26:24 +0000 (19:26 +0000)]
IR: Remove direct comparisons against Metadata::Storage, NFC
llvm-svn: 226490
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 19:25:33 +0000 (19:25 +0000)]
IR: Assert that resolve() is only called on uniqued nodes, NFC
Add an assertion in `UniquableMDNode::resolve()` to prevent temporaries
from being resolved (once they're merged back in). Needed to shuffle
order of `resolve()` and `storeDistinctInContext()` to prevent it from
firing.
llvm-svn: 226489
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 19:10:14 +0000 (19:10 +0000)]
IR: Remove isa<UniquableMDNode>, NFC
llvm-svn: 226488
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 19:09:14 +0000 (19:09 +0000)]
IR: Simplify DIBuilder::trackIfUnresolved(), NFC
llvm-svn: 226487
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 19:06:41 +0000 (19:06 +0000)]
IR: Remove isa<MDNodeFwdDecl>, NFC
llvm-svn: 226486
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 19:03:18 +0000 (19:03 +0000)]
IR: Unify code for MDNode::isResolved(), NFC
Unify the definitions of `MDNode::isResolved()` and
`UniquableMDNode::isResolved()`. Previously, `UniquableMDNode` could
answer this question more efficiently, but now that RAUW support has
been unified with `MDNodeFwdDecl`, `MDNode` doesn't need any casts to
figure out the answer.
llvm-svn: 226485
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 19:02:06 +0000 (19:02 +0000)]
IR: Store RAUW support and Context in the same pointer, NFC
Add an `LLVMContext &` to `ReplaceableMetadataImpl`, create a class that
either holds a reference to an `LLVMContext` or owns a
`ReplaceableMetadataImpl`, and use the new class in `MDNode`.
- This saves a pointer in `UniquableMDNode` at the cost of a pointer
in `ValueAsMetadata` (which didn't used to store the `LLVMContext`).
There are far more of the former.
- Unifies RAUW support between `MDNodeFwdDecl` (which is going away,
see r226481) and `UniquableMDNode`.
llvm-svn: 226484
Colin LeMahieu [Mon, 19 Jan 2015 18:56:19 +0000 (18:56 +0000)]
[Hexagon] Converting intrinsics combine imm/imm, simple shifts and extends.
llvm-svn: 226483
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 18:45:35 +0000 (18:45 +0000)]
IR: Add isUniqued() and isTemporary()
Change `MDNode::isDistinct()` to only apply to 'distinct' nodes (not
temporaries), and introduce `MDNode::isUniqued()` and
`MDNode::isTemporary()` for the other two possibilities.
llvm-svn: 226482
Duncan P. N. Exon Smith [Mon, 19 Jan 2015 18:36:18 +0000 (18:36 +0000)]
IR: Use an enum to describe Metadata storage, NFC
More clearly describe the type of storage used for `Metadata`.
- `Uniqued`: uniqued, stored in the context.
- `Distinct`: distinct, stored in the context.
- `Temporary`: not owned by anyone.
This is the first in a series of commits to fix a design problem with
`MDNodeFwdDecl` that I need to solve for PR22235. While `MDNodeFwdDecl`
works well as a forward declaration, we use `MDNode::getTemporary()` for
more than forward declarations -- we also need to create early versions
of nodes (with fields not filled in) that we'll fill out later (see
`DIBuilder::finalize()` and `CGDebugInfo::finalize()` for examples).
This was a blind spot I had when I introduced `MDNodeFwdDecl` (which
David Blaikie (indirectly) highlighted in an unrelated review [1]).
[1]: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-
20150112/252381.html
In general, we need `MDTuple::getTemporary()` to give a temporary tuple
(like `MDNodeFwdDecl`), `MDLocation::getTemporary()` to give a temporary
location, and (the problem at hand) `GenericDebugMDNode::getTemporary()`
to give a temporary generic debug node.
So I need to fold the idea of "temporary" nodes back into
`UniquableMDNode`. (More commits to follow as I refactor.)
llvm-svn: 226481
Colin LeMahieu [Mon, 19 Jan 2015 18:33:58 +0000 (18:33 +0000)]
[Hexagon] Converting remaining ALU32/ALU intrinsics.
llvm-svn: 226480
Andrey Churbanov [Mon, 19 Jan 2015 18:29:35 +0000 (18:29 +0000)]
added support for PPC architectures (version 3): initial patch provided by Carlo Bertolli, latest version from Johnny Peyton
llvm-svn: 226479
Colin LeMahieu [Mon, 19 Jan 2015 18:22:19 +0000 (18:22 +0000)]
[Hexagon] Converting ALU32/ALU intrinsics to new patterns.
llvm-svn: 226478
Vince Harron [Mon, 19 Jan 2015 18:18:24 +0000 (18:18 +0000)]
Print out the full output of gtest
This patch fixes a bug that prevented all gtest output from being
displayed.
Submitted for Tamas Berghammer
llvm-svn: 226477
Adrian Prantl [Mon, 19 Jan 2015 17:57:29 +0000 (17:57 +0000)]
Remove support for DIVariable's FlagIndirectVariable and expect
frontends to use a DIExpression with a DW_OP_deref instead.
This is not only a much more natural place for this informationl; there
is also a technical reason: The FlagIndirectVariable is used to mark a
variable that is turned into a reference by virtue of the calling
convention; this happens for example to aggregate return values.
The inliner, for example, may actually need to undo this indirection to
correctly represent the value in its new context. This is impossible to
implement because the DIVariable can't be safely modified. We can however
safely construct a new DIExpression on the fly.
llvm-svn: 226476
Adrian Prantl [Mon, 19 Jan 2015 17:51:58 +0000 (17:51 +0000)]
Migrate all uses of DIVariable's FlagIndirectVariable to use a DIExpression
with a DW_OP_deref instead.
llvm-svn: 226474
Greg Fitzgerald [Mon, 19 Jan 2015 17:40:05 +0000 (17:40 +0000)]
[AArch64] Implement GHC calling convention
Original patch by Luke Iannini. Minor improvements and test added by
Erik de Castro Lopo.
Differential Revision: http://reviews.llvm.org/D6877
From: Erik de Castro Lopo <erikd@mega-nerd.com>
llvm-svn: 226473
Colin LeMahieu [Mon, 19 Jan 2015 17:36:32 +0000 (17:36 +0000)]
[Hexagon] Converting halfword to double accumulating multiply intrinsics.
llvm-svn: 226472
Vince Harron [Mon, 19 Jan 2015 17:31:22 +0000 (17:31 +0000)]
Fixed Linux build error in gtest
llvm-svn: 226471
Rafael Espindola [Mon, 19 Jan 2015 17:30:24 +0000 (17:30 +0000)]
Produce errors when an assignment expression would use a common symbol.
An assignment will produce a symbol with a given section and offset. There is
no way to represent something like "1 byte after a common symbol".
This matches the behavior of GNU as.
Part of PR22217.
llvm-svn: 226470
Bradley Smith [Mon, 19 Jan 2015 16:37:17 +0000 (16:37 +0000)]
[ARM] SSAT/USAT with an 'asr #32' shift should result in an undefined encoding rather than unpredictable
llvm-svn: 226469
Bradley Smith [Mon, 19 Jan 2015 16:36:02 +0000 (16:36 +0000)]
[ARM] Fixup sign extend instruction availability w.r.t. DSP extension
llvm-svn: 226468
Rafael Espindola [Mon, 19 Jan 2015 15:16:06 +0000 (15:16 +0000)]
Bring r226038 back.
No change in this commit, but clang was changed to also produce trivial comdats when
needed.
Original message:
Don't create new comdats in CodeGen.
This patch stops the implicit creation of comdats during codegen.
Clang now sets the comdat explicitly when it is required. With this patch clang and gcc
now produce the same result in pr19848.
llvm-svn: 226467
Dmitry Vyukov [Mon, 19 Jan 2015 15:01:07 +0000 (15:01 +0000)]
tsan: remove TSAN_SHADOW_COUNT
TSAN_SHADOW_COUNT is defined to 4 in all environments.
Other values of TSAN_SHADOW_COUNT were never tested and
were broken by recent changes to shadow mapping.
Remove it as there is no reason to fix nor maintain it.
llvm-svn: 226466
Rafael Espindola [Mon, 19 Jan 2015 14:02:14 +0000 (14:02 +0000)]
Add comdat to thunks.
llvm-svn: 226465
Andrey Churbanov [Mon, 19 Jan 2015 14:00:00 +0000 (14:00 +0000)]
Two fixes sent by C.Bergstrom: MB() does real synch for ARM; _Quad is not used when not available.
llvm-svn: 226464
Rafael Espindola [Mon, 19 Jan 2015 13:59:31 +0000 (13:59 +0000)]
Make this test a bit stricter. NFC.
llvm-svn: 226463
Viktor Kutuzov [Mon, 19 Jan 2015 13:26:25 +0000 (13:26 +0000)]
[Sanitizers] Intercept statvfs() on FreeBSD
Committed unreviewed with permission.
llvm-svn: 226462
Viktor Kutuzov [Mon, 19 Jan 2015 13:22:33 +0000 (13:22 +0000)]
[Msan] Intercept stat() and fstatat() on FreeBSD
Differential Revision: http://reviews.llvm.org/D7051
llvm-svn: 226461
Chandler Carruth [Mon, 19 Jan 2015 12:37:33 +0000 (12:37 +0000)]
[PM] Update Polly for LLVM r226459 which removed another pass argument
from an API in the process of preparing for the new pass manager.
llvm-svn: 226460
Chandler Carruth [Mon, 19 Jan 2015 12:36:53 +0000 (12:36 +0000)]
[PM] Replace the Pass argument to SplitEdge with specific analyses used
and updated.
This may appear to remove handling for things like alias analysis when
splitting critical edges here, but in fact no callers of SplitEdge
relied on this. Similarly, all of them wanted to preserve LCSSA if there
was any update of the loop info. That makes the interface much simpler.
With this, all of BasicBlockUtils.h is free of Pass arguments and
prepared for the new pass manager. This is tho majority of utilities
that relied on pass arguments.
llvm-svn: 226459
Evgeniy Stepanov [Mon, 19 Jan 2015 12:22:57 +0000 (12:22 +0000)]
[sanitizer] Make unrecognized flags not fatal.
Print a warning at verbosity=1 and higher instead of dying immediately.
llvm-svn: 226458
Chandler Carruth [Mon, 19 Jan 2015 12:12:00 +0000 (12:12 +0000)]
[PM] Cleanup a dead option to critical edge splitting that I noticed
while refactoring this API for the new pass manager.
No functionality changed here, the code didn't actually support this
option.
llvm-svn: 226457
Chandler Carruth [Mon, 19 Jan 2015 12:09:11 +0000 (12:09 +0000)]
[PM] Remove the Pass argument from all of the critical edge splitting
APIs and replace it and numerous booleans with an option struct.
The critical edge splitting API has a really large surface of flags and
so it seems worth burning a small option struct / builder. This struct
can be constructed with the various preserved analyses and then flags
can be flipped in a builder style.
The various users are now responsible for directly passing along their
analysis information. This should be enough for the critical edge
splitting to work cleanly with the new pass manager as well.
This API is still pretty crufty and could be cleaned up a lot, but I've
focused on this change just threading an option struct rather than
a pass through the API.
llvm-svn: 226456
Sergey Dmitrouk [Mon, 19 Jan 2015 12:02:25 +0000 (12:02 +0000)]
[NFC] Update createMachineScheduler() comment
It became invalid after signature changes.
llvm-svn: 226455
Daniel Jasper [Mon, 19 Jan 2015 11:49:32 +0000 (11:49 +0000)]
clang-format: Fix crasher on weird comments.
Crashing input:
/\
/ comment
llvm-svn: 226454
Evgeniy Stepanov [Mon, 19 Jan 2015 11:47:13 +0000 (11:47 +0000)]
[sanitizer] Switch flag parsing to LowLevelAlloc.
InternalAlloc is quite complex and its behavior may depend on the values of
flags. As such, it should not be used while parsing flags.
Sadly, LowLevelAlloc does not support deallocation of memory.
llvm-svn: 226453
Evgeniy Stepanov [Mon, 19 Jan 2015 10:54:36 +0000 (10:54 +0000)]
[sanitizer] Simplify code in flag parser.
llvm-svn: 226452
Daniel Jasper [Mon, 19 Jan 2015 10:52:16 +0000 (10:52 +0000)]
clang-format: Fix crasher on incomplete condition compilation.
Previously crashing input:
void f(
#if A
);
#else
#endif
llvm-svn: 226451
Daniel Jasper [Mon, 19 Jan 2015 10:51:42 +0000 (10:51 +0000)]
clang-format: Fix crash on invalid code.
Input "a<," made clang-format crash.
llvm-svn: 226450
Daniel Jasper [Mon, 19 Jan 2015 10:51:23 +0000 (10:51 +0000)]
clang-format: Fix clang-format crash on invalid code.
llvm-svn: 226449
Daniel Jasper [Mon, 19 Jan 2015 10:51:05 +0000 (10:51 +0000)]
clang-format: Fix assertion when trying to build a nullptr StringRef.
llvm-svn: 226448
Daniel Jasper [Mon, 19 Jan 2015 10:50:51 +0000 (10:50 +0000)]
clang-format: Fix endless loop on incomplete try-catch-block.
llvm-svn: 226447
Daniel Jasper [Mon, 19 Jan 2015 10:50:08 +0000 (10:50 +0000)]
clang-format: Remove assert that isn't helpful.
This assert would trigger on:
#d , = }
llvm-svn: 226446
Manuel Klimek [Mon, 19 Jan 2015 10:48:04 +0000 (10:48 +0000)]
Make clang-format work in emacs buffers with unicode characters.
Emacs functions by default use character positions; convert characters
to offsets when handing parameters to clang-format and convert byte
offsets we get from clang-format back to character positions.
Reworked the code a bit so the 0-based to 1-based offset calculations
are done in the same place where we do the multi-byte to offset mapping.
llvm-svn: 226445
Chandler Carruth [Mon, 19 Jan 2015 10:43:00 +0000 (10:43 +0000)]
Suppress the newly added Clang warning for the inaccessible base in this
test. Do that after we suppress the warnings for unknown pragmas as this
warning flag is quite new in Clang and so old Clang's would warn all the
time on this file.
llvm-svn: 226444
Chandler Carruth [Mon, 19 Jan 2015 10:23:00 +0000 (10:23 +0000)]
[PM] Relax asserts and always try to reconstruct loop simplify form when
we can while splitting critical edges.
The only code which called this and didn't require simplified loops to
be preserved is polly, and the code behaves correctly there anyways.
Without this change, it becomes really hard to share this code with the
new pass manager where things like preserving loop simplify form don't
make any sense.
If anyone discovers this code behaving incorrectly, what it *should* be
testing for is whether the loops it needs to be in simplified form are
in fact in that form. It should always be trying to preserve that form
when it exists.
llvm-svn: 226443
David Majnemer [Mon, 19 Jan 2015 10:21:22 +0000 (10:21 +0000)]
Add back a check removed in r226436
It shouldn't have been removed, the code which replaced it didn't cover
this case.
llvm-svn: 226442
NAKAMURA Takumi [Mon, 19 Jan 2015 09:49:59 +0000 (09:49 +0000)]
SemaDeclCXX.cpp: Suppress a warning. [-Wunused-variable]
llvm-svn: 226441
Viktor Kutuzov [Mon, 19 Jan 2015 09:41:52 +0000 (09:41 +0000)]
[Sanitizers] Order initialization of coverage and guard arrays
Differential Revision: http://reviews.llvm.org/D6892
llvm-svn: 226440
Erik Eckstein [Mon, 19 Jan 2015 09:33:38 +0000 (09:33 +0000)]
SLPVectorizer: limit the number of alias checks to reduce the runtime.
In case of blocks with many memory-accessing instructions, alias checking can take lot of time
(because calculating the memory dependencies has quadratic complexity).
I chose a limit which resulted in no changes when running the benchmarks.
llvm-svn: 226439
Evgeniy Stepanov [Mon, 19 Jan 2015 09:21:44 +0000 (09:21 +0000)]
[sanitizer] Move options-related tests to sanitizer_common.
And handle help=1 in standalone LSan.
llvm-svn: 226438
Evgeniy Stepanov [Mon, 19 Jan 2015 09:20:28 +0000 (09:20 +0000)]
[msan] Use internal__exit() instead of _exit().
llvm-svn: 226437
David Majnemer [Mon, 19 Jan 2015 09:00:28 +0000 (09:00 +0000)]
Sema: Variable definitions cannot be __attribute__((alias))
Things that are OK:
extern int var1 __attribute((alias("v1")));
static int var2 __attribute((alias("v2")));
Things that are not OK:
int var3 __attribute((alias("v3")));
extern int var4 __attribute((alias("v4"))) = 4;
We choose to accpet:
struct S { static int var5 __attribute((alias("v5"))); };
This code causes assertion failues in GCC 4.8 and ICC 13.0.1, we have
no reason to reject it.
This partially fixes PR22217.
llvm-svn: 226436
Evgeniy Stepanov [Mon, 19 Jan 2015 08:26:38 +0000 (08:26 +0000)]
[dfsan] Use append_no_rtti_flag instead of manually specifying -fno-rtti.
llvm-svn: 226435
Hal Finkel [Mon, 19 Jan 2015 07:44:45 +0000 (07:44 +0000)]
[PowerPC] Minor correction to r226432
We don't need to exclude patchpoints from the implicit r2 dependence in
FastISel because it is added as an implicit operand and, thus, should not
confuse that StackMap code.
By inspection / no test case.
llvm-svn: 226434
Michael Kuperstein [Mon, 19 Jan 2015 07:30:47 +0000 (07:30 +0000)]
[MIScheduler] Slightly better handling of constrainLocalCopy when both source and dest are local
This fixes PR21792.
Differential Revision: http://reviews.llvm.org/D6823
llvm-svn: 226433
Hal Finkel [Mon, 19 Jan 2015 07:20:27 +0000 (07:20 +0000)]
[PowerPC] Add r2 as an operand for all calls under both PPC64 ELF V1 and V2
Our PPC64 ELF V2 call lowering logic added r2 as an operand to all direct call
instructions in order to represent the dependency on the TOC base pointer
value. Restricting this to ELF V2, however, does not seem to make sense: calls
under ELF V1 have the same dependence, and indirect calls have an r2 dependence
just as direct ones. Make sure the dependence is noted for all calls under both
ELF V1 and ELF V2.
llvm-svn: 226432