Alp Toker [Sat, 11 Jan 2014 13:27:28 +0000 (13:27 +0000)]
lit: execfile() isn't present in Python 3.3
On the other hand, exec(compile()) doesn't work in older Python versions in the
2.x series.
This commit introduces exec(compile()) with a fallback to plain exec(). That'll
hopefully hit the sweet spot in terms of version support.
Followup to r198766 which added enhanced source locations for lit cfg parsing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199006
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 11 Jan 2014 12:06:47 +0000 (12:06 +0000)]
[PM] Actually nest pass managers correctly when parsing the pass
pipeline string. Add tests that cover this now that we have execution
dumping in the pass managers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199005
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 11 Jan 2014 11:52:05 +0000 (11:52 +0000)]
[PM] Add names to passes under the new pass manager, and a debug output
mode that can be used to debug the execution of everything.
No support for analyses here, that will come later. This already helps
show parts of the opt commandline integration that isn't working. Tests
of that will start using it as the bugs are fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199004
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 11 Jan 2014 10:59:00 +0000 (10:59 +0000)]
[PM] Somehow I missed the header guards on this file. Yikes!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199003
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 11 Jan 2014 09:59:27 +0000 (09:59 +0000)]
LoopVectorize.cpp: Appease MSC16.
Excuse me, I hope msc16 builders would be fine till its end day.
Introduce nullptr then. ;)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199001
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 11 Jan 2014 09:23:52 +0000 (09:23 +0000)]
llvm/test/Transforms/SampleProfile/syntax.ll: Eliminate locale-sensitive message check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199000
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 11 Jan 2014 09:23:44 +0000 (09:23 +0000)]
llvm/test/CodeGen/X86/anyregcc.ll: Add explicit -mtriple=x86_64-unknown-unknown.
XMM(s) are really spilling for targeting Win64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198999
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 11 Jan 2014 08:16:35 +0000 (08:16 +0000)]
[PM] Add (very skeletal) support to opt for running the new pass
manager. I cannot emphasize enough that this is a WIP. =] I expect it
to change a great deal as things stabilize, but I think its really
important to get *some* functionality here so that the infrastructure
can be tested more traditionally from the commandline.
The current design is looking something like this:
./bin/opt -passes='module(pass_a,pass_b,function(pass_c,pass_d))'
So rather than custom-parsed flags, there is a single flag with a string
argument that is parsed into the pass pipeline structure. This makes it
really easy to have nice structural properties that are very explicit.
There is one obvious and important shortcut. You can start off the
pipeline with a pass, and the minimal context of pass managers will be
built around the entire specified pipeline. This makes the common case
for tests super easy:
./bin/opt -passes=instcombine,sroa,gvn
But this won't introduce any of the complexity of the fully inferred old
system -- we only ever do this for the *entire* argument, and we only
look at the first pass. If the other passes don't fit in the pass
manager selected it is a hard error.
The other interesting aspect here is that I'm not relying on any
registration facilities. Such facilities may be unavoidable for
supporting plugins, but I have alternative ideas for plugins that I'd
like to try first. My plan is essentially to build everything without
registration until we hit an absolute requirement.
Instead of registration of pass names, there will be a library dedicated
to parsing pass names and the pass pipeline strings described above.
Currently, this is directly embedded into opt for simplicity as it is
very early, but I plan to eventually pull this into a library that opt,
bugpoint, and even Clang can depend on. It should end up as a good home
for things like the existing PassManagerBuilder as well.
There are a bunch of FIXMEs in the code for the parts of this that are
just stubbed out to make the patch more incremental. A quick list of
what's coming up directly after this:
- Support for function passes and building the structured nesting.
- Support for printing the pass structure, and FileCheck tests of all of
this code.
- The .def-file based pass name parsing.
- IR priting passes and the corresponding tests.
Some obvious things that I'm not going to do right now, but am
definitely planning on as the pass manager work gets a bit further:
- Pull the parsing into library, including the builders.
- Thread the rest of the target stuff into the new pass manager.
- Wire support for the new pass manager up to llc.
- Plugin support.
Some things that I'd like to have, but are significantly lower on my
priority list. I'll get to these eventually, but they may also be places
where others want to contribute:
- Adding nice error reporting for broken pass pipeline descriptions.
- Typo-correction for pass names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198998
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Sat, 11 Jan 2014 01:00:27 +0000 (01:00 +0000)]
[anyregcc] Fix callee-save mask for anyregcc
Use separate callee-save masks for XMM and YMM registers for anyregcc on X86 and
select the proper mask depending on the target cpu we compile for.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198985
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 11 Jan 2014 00:28:12 +0000 (00:28 +0000)]
Revert r198979 - accidental commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198981
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 11 Jan 2014 00:23:18 +0000 (00:23 +0000)]
Reformat.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198980
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 11 Jan 2014 00:23:16 +0000 (00:23 +0000)]
Update function name and add some helpful comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198979
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 11 Jan 2014 00:23:11 +0000 (00:23 +0000)]
Fix odd whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198978
91177308-0d34-0410-b5e6-
96231b3b80d8
Diego Novillo [Fri, 10 Jan 2014 23:23:51 +0000 (23:23 +0000)]
Extend and simplify the sample profile input file.
1- Use the line_iterator class to read profile files.
2- Allow comments in profile file. Lines starting with '#'
are completely ignored while reading the profile.
3- Add parsing support for discriminators and indirect call samples.
Our external profiler can emit more profile information that we are
currently not handling. This patch does not add new functionality to
support this information, but it allows profile files to provide it.
I will add actual support later on (for at least one of these
features, I need support for DWARF discriminators in Clang).
A sample line may contain the following additional information:
Discriminator. This is used if the sampled program was compiled with
DWARF discriminator support
(http://wiki.dwarfstd.org/index.php?title=Path_Discriminators). This
is currently only emitted by GCC and we just ignore it.
Potential call targets and samples. If present, this line contains a
call instruction. This models both direct and indirect calls. Each
called target is listed together with the number of samples. For
example,
130: 7 foo:3 bar:2 baz:7
The above means that at relative line offset 130 there is a call
instruction that calls one of foo(), bar() and baz(). With baz()
being the relatively more frequent call target.
Differential Revision: http://llvm-reviews.chandlerc.com/D2355
4- Simplify format of profile input file.
This implements earlier suggestions to simplify the format of the
sample profile file. The symbol table is not necessary and function
profiles do not need to know the number of samples in advance.
Differential Revision: http://llvm-reviews.chandlerc.com/D2419
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198973
91177308-0d34-0410-b5e6-
96231b3b80d8
Diego Novillo [Fri, 10 Jan 2014 23:23:46 +0000 (23:23 +0000)]
Propagation of profile samples through the CFG.
This adds a propagation heuristic to convert instruction samples
into branch weights. It implements a similar heuristic to the one
implemented by Dehao Chen on GCC.
The propagation proceeds in 3 phases:
1- Assignment of block weights. All the basic blocks in the function
are initial assigned the same weight as their most frequently
executed instruction.
2- Creation of equivalence classes. Since samples may be missing from
blocks, we can fill in the gaps by setting the weights of all the
blocks in the same equivalence class to the same weight. To compute
the concept of equivalence, we use dominance and loop information.
Two blocks B1 and B2 are in the same equivalence class if B1
dominates B2, B2 post-dominates B1 and both are in the same loop.
3- Propagation of block weights into edges. This uses a simple
propagation heuristic. The following rules are applied to every
block B in the CFG:
- If B has a single predecessor/successor, then the weight
of that edge is the weight of the block.
- If all the edges are known except one, and the weight of the
block is already known, the weight of the unknown edge will
be the weight of the block minus the sum of all the known
edges. If the sum of all the known edges is larger than B's weight,
we set the unknown edge weight to zero.
- If there is a self-referential edge, and the weight of the block is
known, the weight for that edge is set to the weight of the block
minus the weight of the other incoming edges to that block (if
known).
Since this propagation is not guaranteed to finalize for every CFG, we
only allow it to proceed for a limited number of iterations (controlled
by -sample-profile-max-propagate-iterations). It currently uses the same
GCC default of 100.
Before propagation starts, the pass builds (for each block) a list of
unique predecessors and successors. This is necessary to handle
identical edges in multiway branches. Since we visit all blocks and all
edges of the CFG, it is cleaner to build these lists once at the start
of the pass.
Finally, the patch fixes the computation of relative line locations.
The profiler emits lines relative to the function header. To discover
it, we traverse the compilation unit looking for the subprogram
corresponding to the function. The line number of that subprogram is the
line where the function begins. That becomes line zero for all the
relative locations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198972
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Roeder [Fri, 10 Jan 2014 23:17:39 +0000 (23:17 +0000)]
Space formatting fix for r198966.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198971
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Divacky [Fri, 10 Jan 2014 22:59:49 +0000 (22:59 +0000)]
Constant propagate MachineInstrClassName.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198969
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Roeder [Fri, 10 Jan 2014 22:55:25 +0000 (22:55 +0000)]
Fixing build break: should be in the if statement, not outside.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198966
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Roeder [Fri, 10 Jan 2014 22:48:35 +0000 (22:48 +0000)]
Restore the library dependency of LLVMgold on LTO; this was removed recently but
is needed for LLVMgold to load in ld.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198965
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 10 Jan 2014 22:06:26 +0000 (22:06 +0000)]
Add a note about the old asm printer being removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198960
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 10 Jan 2014 21:49:27 +0000 (21:49 +0000)]
All backends use MC now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198959
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 10 Jan 2014 21:40:29 +0000 (21:40 +0000)]
Use the simpler version of sys::fs::remove when possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198958
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 10 Jan 2014 20:36:42 +0000 (20:36 +0000)]
Remove remove_all. A compiler has no need for recursively deleting a directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198955
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 10 Jan 2014 20:24:35 +0000 (20:24 +0000)]
LTO: whitespace changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198954
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Fri, 10 Jan 2014 18:20:32 +0000 (18:20 +0000)]
LoopVectorizer: Handle strided memory accesses by versioning
for (i = 0; i < N; ++i)
A[i * Stride1] += B[i * Stride2];
We take loops like this and check that the symbolic strides 'Strided1/2' are one
and drop to the scalar loop if they are not.
This is currently disabled by default and hidden behind the flag
'enable-mem-access-versioning'.
radar://
13075509
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198950
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Fri, 10 Jan 2014 18:20:29 +0000 (18:20 +0000)]
SCEVRewriter: Optionally interpret constants in value map as SCEVConstant
An upcoming loop vectorizer commit will want to replace a SCEVUnknown(Value*)
by a SCEVConstant. This commit modifies the SCEVParameterRewriter to support
this. The SCEVParameterRewriter constructor can optionally specify to follow
this behavior.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198949
91177308-0d34-0410-b5e6-
96231b3b80d8
Artyom Skrobov [Fri, 10 Jan 2014 16:49:49 +0000 (16:49 +0000)]
Amending test/MC/ARM/thumb2-mclass.s to match its apparent original purpose (to test the ARMv6M/ARMv7M commonality), and creating a new test case for the differences between ARMv6M and ARMv7M
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198946
91177308-0d34-0410-b5e6-
96231b3b80d8
Artyom Skrobov [Fri, 10 Jan 2014 16:42:55 +0000 (16:42 +0000)]
Must not produce Tag_CPU_arch_profile for pre-ARMv7 cores (e.g. cortex-m0)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198945
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Fri, 10 Jan 2014 16:22:47 +0000 (16:22 +0000)]
ARM: fix regression caused by r198914
The disassembler would no longer be able to disambiguage between the two
variants (explicit immediate #0 vs implicit, omitted #0) for the ldrt, strt,
ldrbt, strbt mnemonics as both versions indicated the disassembler routine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198944
91177308-0d34-0410-b5e6-
96231b3b80d8
Kristof Beyls [Fri, 10 Jan 2014 14:20:45 +0000 (14:20 +0000)]
Silence unused variable warning for non-asserting builds that was introduced in r198937.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198941
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 10 Jan 2014 13:42:12 +0000 (13:42 +0000)]
Use 'w' instead of 'c' to represent the win32 mangling.
This change was requested to avoid confusion if we ever support non windows coff
systems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198938
91177308-0d34-0410-b5e6-
96231b3b80d8
Kristof Beyls [Fri, 10 Jan 2014 13:41:49 +0000 (13:41 +0000)]
Make sure -use-init-array has intended effect on all AArch64 ELF targets, not just linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198937
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 10 Jan 2014 11:12:01 +0000 (11:12 +0000)]
Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198934
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 10 Jan 2014 11:02:26 +0000 (11:02 +0000)]
Sink add_llvm_library(gtest_main) to UnitTestMain/CMakeLists.txt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198933
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 10 Jan 2014 10:38:52 +0000 (10:38 +0000)]
llvm/test/ExecutionEngine/MCJIT/load-object-a.ll: Remove "REQUIRES:shell". This doesn't depend on shell's behavior.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198931
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 10 Jan 2014 10:38:46 +0000 (10:38 +0000)]
llvm/test/ExecutionEngine/MCJIT/lit.local.cfg: Add "AMD64" in the host_arch list.
FIXME: We should not take CMake's ${CMAKE_SYSTEM_PROCESSOR}...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198930
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 10 Jan 2014 10:38:40 +0000 (10:38 +0000)]
lli: Tweak CacheName not to contain DOS driveletter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198929
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 10 Jan 2014 10:38:34 +0000 (10:38 +0000)]
lli: LLIObjectCache: Use llvm::sys::path to get dirname.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198928
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 10 Jan 2014 10:38:28 +0000 (10:38 +0000)]
Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198927
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 10 Jan 2014 10:38:23 +0000 (10:38 +0000)]
llvm/test/ExecutionEngine/MCJIT/load-object-a.ll: Fix not to use %t.cachedir/%p.
%p is like X:\foo\bar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198926
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Fri, 10 Jan 2014 08:05:42 +0000 (08:05 +0000)]
reapply r198858: Disable LeakSanitizer in TableGen binaries, see PR18325; this time LeakSanitizerIsTurnedOffForTheCurrentProcess is used instead of __lsan_is_turned_off
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198922
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Fri, 10 Jan 2014 04:38:40 +0000 (04:38 +0000)]
ARM IAS: support #:{lower,upper}16: for GNU compatibility
The GNU assembler supports prefixing the expression with a '#' to indiciate that
the value that is being moved is infact a constant. This improves the
compatibility of the integrated assembler's parser for this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198916
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Fri, 10 Jan 2014 04:38:35 +0000 (04:38 +0000)]
ARM IAS: support GNU extension for ldrd, strd
The GNU assembler has an extension that allows for the elision of the paired
register (dt2) for the LDRD and STRD mnemonics. Add support for this in the
assembly parser. Canonicalise the usage during the instruction parsing from
the specified version.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198915
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Fri, 10 Jan 2014 04:38:31 +0000 (04:38 +0000)]
ARM IAS: support implicit immediate 0s for {LD,ST}R{B,}T
The ARM ARM indicates the mnemonics as follows:
ldrbt{<c>}{<q>} <Rt>, [<Rn>], {, #+/-<imm>}
ldrt{<c>}{<q>} <Rt>, [<Rn>] {, #+/-<imm>}
strbt{<c>}{<q>} <Rt>, [<Rn>] {, #<imm>}
strt{<c>}{<q>} <Rt>, [<Rn>] {, #+/-<imm>}
This improves the parser to deal with the implicit immediate 0 for the mnemonics
as per the specification.
Thanks to Joerg Sonnenberger for the tests!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198914
91177308-0d34-0410-b5e6-
96231b3b80d8
Venkatraman Govindaraju [Fri, 10 Jan 2014 02:55:27 +0000 (02:55 +0000)]
[Sparc] Emit retl/ret instead of jmp instruction. It improves the readability of the assembly generated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198910
91177308-0d34-0410-b5e6-
96231b3b80d8
Venkatraman Govindaraju [Fri, 10 Jan 2014 01:48:17 +0000 (01:48 +0000)]
[Sparc] Add support for parsing jmpl instruction and make indirect call and jmp instructions as aliases to jmpl.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198909
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 10 Jan 2014 01:38:41 +0000 (01:38 +0000)]
Revert "Revert r198851, "Prototype of skeleton type units for fission""
This reverts commit r198865 which reverts r198851.
ASan identified a use-of-uninitialized of the DwarfTypeUnit::Ty variable
in skeleton type units.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198908
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Fri, 10 Jan 2014 00:43:32 +0000 (00:43 +0000)]
Fix a bug with the ARM thumb2 CBNZ and CBNZ instructions that
branch to the next instruction. This can not be encoded but can be
turned into a NOP.
rdar://
15062072
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198904
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 10 Jan 2014 00:08:34 +0000 (00:08 +0000)]
Update the developer policy to more clearly spell out the steps for
contributors to submit patches to the LLVM project. Thanks to Danny,
Chris, Alp, and others for reviewing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198901
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Thu, 9 Jan 2014 22:02:05 +0000 (22:02 +0000)]
Bitcode: Fix a typo in an assert
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198894
91177308-0d34-0410-b5e6-
96231b3b80d8
Venkatraman Govindaraju [Thu, 9 Jan 2014 21:49:18 +0000 (21:49 +0000)]
[Sparc] Multiclass for loads/stores. No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198893
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 9 Jan 2014 20:24:00 +0000 (20:24 +0000)]
Clean up an inconsistency in v7s feature default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198889
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 9 Jan 2014 19:47:39 +0000 (19:47 +0000)]
Add a unit test for the copy constructor.
I would not normally add tests like these, but the copy constructor is not
used at all in our codebase with c++11, so having this tests might prevent
breaking the c++03 build again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198886
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Thu, 9 Jan 2014 19:40:55 +0000 (19:40 +0000)]
Revert "Disable LeakSanitizer in TableGen binaries, see PR18325"
To declare or define reserved identifers is undefined behaviour in standard
C++. This needs to be addressed in compiler-rt before it can be used in LLVM.
See the list discussion for details.
This reverts commit r198858.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198884
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 9 Jan 2014 19:22:07 +0000 (19:22 +0000)]
Re-remove dead code.
This reverts r198854.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198879
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 9 Jan 2014 14:40:43 +0000 (14:40 +0000)]
Update example to be more idiomatic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198872
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 9 Jan 2014 13:08:00 +0000 (13:08 +0000)]
Revert r198851, "Prototype of skeleton type units for fission"
It caused undefined behavior. DwarfTypeUnit::Ty might not be initialized properly, I guess.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198865
91177308-0d34-0410-b5e6-
96231b3b80d8
Stepan Dyatkovskiy [Thu, 9 Jan 2014 12:26:12 +0000 (12:26 +0000)]
Fixed old typo in ScalarEvolution, that caused wrong SCEVs zext operation.
Detailed description is here:
http://llvm.org/bugs/show_bug.cgi?id=18000#c16
For participation in bugfix process special thanks to David Wiberg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198863
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Thu, 9 Jan 2014 11:28:53 +0000 (11:28 +0000)]
[SystemZ] Fix RNSBG bug introduced by r197802
The zext handling added in r197802 wasn't right for RNSBG. This patch
restricts it to ROSBG, RXSBG and RISBG. (The tests for RISBG were added
in r197802 since RISBG was the motivating example.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198862
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Thu, 9 Jan 2014 10:56:42 +0000 (10:56 +0000)]
Handle masked rotate amounts
At the moment we expect rotates to have the form:
(or (shl X, Y), (shr X, Z))
where Y == bitsize(X) - Z or Z == bitsize(X) - Y. This form means that
the (or ...) is undefined for Y == 0 or Z == 0. This undefinedness can
be avoided by using Y == (C * bitsize(X) - Z) & (bitsize(X) - 1) or
Z == (C * bitsize(X) - Y) & (bitsize(X) - 1) for any integer C
(including 0, the most natural choice).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198861
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Thu, 9 Jan 2014 10:49:40 +0000 (10:49 +0000)]
Match the InstCombine form of rotates by X+C
InstCombine converts (sub 32, (add X, C)) into (sub 32-C, X),
so a rotate left of a 32-bit Y by X+C could appear as either:
(or (shl Y, (add X, C)), (shr Y, (sub 32, (add X, C))))
without InstCombine or:
(or (shl Y, (add X, C)), (shr Y, (sub 32-C, X)))
with it.
We already matched the first form. This patch handles the second too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198860
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Thu, 9 Jan 2014 09:26:26 +0000 (09:26 +0000)]
Disable LeakSanitizer in TableGen binaries, see PR18325
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198858
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 9 Jan 2014 07:50:34 +0000 (07:50 +0000)]
Revert r198819 - "Remove dead code."
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198854
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 9 Jan 2014 05:29:59 +0000 (05:29 +0000)]
Fix accidental use of the exotic "std::string::back()" method. Turns out it's
new in C++11.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198853
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 9 Jan 2014 05:24:05 +0000 (05:24 +0000)]
Add an "-object-cache-dir=<string>" option to LLI. This option specifies the
root path to which object files managed by the LLIObjectCache instance should be
written. This option defaults to "", in which case objects are cached in the
same directory as the bitcode they are derived from.
The load-object-a.ll test has been rewritten to use this option to support
testing in environments where the test directory is not writable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198852
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 9 Jan 2014 05:08:28 +0000 (05:08 +0000)]
Prototype of skeleton type units for fission
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198851
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 9 Jan 2014 05:08:24 +0000 (05:08 +0000)]
llvm-dwarfdump: type unit dwo support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198850
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Thu, 9 Jan 2014 04:31:18 +0000 (04:31 +0000)]
llvm-readobj: address review comments for ARM EHABI printing
Rename bytecode to opcodes to make it more clear. Change an impossible case to
llvm_unreachable instead. Avoid allocation of a buffer by modifying the
PrintOpcodes iteration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198848
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Thu, 9 Jan 2014 04:31:14 +0000 (04:31 +0000)]
llvm-readobj: fix endianness
Explicitly handle endianness to ensure that bytes are read properly on
big-endian systems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198847
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 9 Jan 2014 04:28:46 +0000 (04:28 +0000)]
DwarfDebug: Refactor out common skeleton construction code to be reused for type unit skeletons.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198846
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 9 Jan 2014 03:28:55 +0000 (03:28 +0000)]
Extend llvm::AlignedCharArrayUnion to support up to 10 arguments, as required by Clang's APValue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198844
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 9 Jan 2014 03:24:13 +0000 (03:24 +0000)]
Reformatting for r198842
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198843
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 9 Jan 2014 03:23:41 +0000 (03:23 +0000)]
DwarfUnit: Rename "Node" to "CUNode" and propagate it through DwarfTypeUnit as well.
Since we'll now also need the split dwarf file name along with the
language in DwarfTypeUnits, just use the whole DICompileUnit rather than
explicitly handling each field needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198842
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 9 Jan 2014 03:03:27 +0000 (03:03 +0000)]
Revert "DwarfUnit: Move the DICompileUnit Node to the DwarfCompileUnit only"
This reverts commit r198830.
Decided to go a different way with this...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198841
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 9 Jan 2014 02:39:45 +0000 (02:39 +0000)]
[PM] Rename this source file to something a bit more generic before
I add support for the new pass manager to it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198838
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 9 Jan 2014 02:29:41 +0000 (02:29 +0000)]
Put the functionality for printing a value to a raw_ostream as an
operand into the Value interface just like the core print method is.
That gives a more conistent organization to the IR printing interfaces
-- they are all attached to the IR objects themselves. Also, update all
the users.
This removes the 'Writer.h' header which contained only a single function
declaration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198836
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 9 Jan 2014 01:20:14 +0000 (01:20 +0000)]
DwarfUnit: Move the DICompileUnit Node to the DwarfCompileUnit only
It's unused in DwarfTypeUnit, as is expected.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198830
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 9 Jan 2014 01:09:57 +0000 (01:09 +0000)]
Remove the test for endianness in configure.ac and regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198825
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 9 Jan 2014 00:47:54 +0000 (00:47 +0000)]
Replace fstream use with raw_fd_ostream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198821
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 9 Jan 2014 00:32:54 +0000 (00:32 +0000)]
Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198819
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 9 Jan 2014 00:25:25 +0000 (00:25 +0000)]
Use the existing typedef to avoid forming a reference to a reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198817
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Thu, 9 Jan 2014 00:22:31 +0000 (00:22 +0000)]
llvm.experimental.stackmap: fix encoding of large constants.
In the stackmap format we advertise the constant field as signed.
However, we were determining whether to promote to a 64-bit constant
pool based on an unsigned comparison.
This fix allows -1 to be encoded as a small constant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198816
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 9 Jan 2014 00:13:35 +0000 (00:13 +0000)]
Simplify/collapse/denest a conditions/blocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198813
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 8 Jan 2014 23:29:59 +0000 (23:29 +0000)]
llvm-dwarfdump: reorder dwo sections to immediately proceed their non-dwo equivalents
This makes it easier to write a test that's mostly shared between
fission and non-fission (using FileCheck's multiple prefix support).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198806
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 8 Jan 2014 22:27:04 +0000 (22:27 +0000)]
Fix the C++03 build.
With c++11 we never instantiate the copy constructor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198803
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 8 Jan 2014 22:03:39 +0000 (22:03 +0000)]
Use getError and remove the error_code operator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198799
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 8 Jan 2014 21:59:22 +0000 (21:59 +0000)]
Remove vestigal bits of MC from the mangler. It no longer uses this, and
having the include could cause weird layering problems between the IR
and MC libraries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198796
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Wed, 8 Jan 2014 21:52:02 +0000 (21:52 +0000)]
Conservatively handle multiple MMOs in MIsNeedChainEdge
MIsNeedChainEdge, which is used by -enable-aa-sched-mi (AA in misched), had an
llvm_unreachable when -enable-aa-sched-mi is enabled and we reach an
instruction with multiple MMOs. Instead, return a conservative answer. This
allows testing -enable-aa-sched-mi on x86.
Also, this moves the check above the isUnsafeMemoryObject checks.
isUnsafeMemoryObject is currently correct only for instructions with one MMO
(as noted in the comment in isUnsafeMemoryObject):
// We purposefully do no check for hasOneMemOperand() here
// in hope to trigger an assert downstream in order to
// finish implementation.
The problem with this is that, had the candidate edge passed the
"!MIa->mayStore() && !MIb->mayStore()" check, the hoped-for assert would never
happen (which could, in theory, lead to incorrect behavior if one of these
secondary MMOs was volatile, for example).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198795
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 8 Jan 2014 21:47:14 +0000 (21:47 +0000)]
Move declaration of variables down to first use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198794
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 8 Jan 2014 21:38:04 +0000 (21:38 +0000)]
Add missing definitions of key_type and value_type to DenseSet.
This matches std::set and allows using DenseSet with the functions
in SetOperations.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198793
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 8 Jan 2014 21:17:09 +0000 (21:17 +0000)]
Add get and getError methods to ErrorOr.
ErrorOr is modeled after boost::optional which has a get method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198792
91177308-0d34-0410-b5e6-
96231b3b80d8
Ana Pazos [Wed, 8 Jan 2014 21:02:13 +0000 (21:02 +0000)]
[AArch64][NEON] Added UXTL and UXTL2 instruction aliases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198791
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Divacky [Wed, 8 Jan 2014 18:50:32 +0000 (18:50 +0000)]
Force emit a relocation for @gnu_indirect_function symbols so that the indirect
resolution works.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198780
91177308-0d34-0410-b5e6-
96231b3b80d8
David Woodhouse [Wed, 8 Jan 2014 18:38:26 +0000 (18:38 +0000)]
[x86] Remove OpSize16 flag from MOV32r0
It's not a real instruction any more and doesn't need encoding information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198778
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Wed, 8 Jan 2014 18:33:04 +0000 (18:33 +0000)]
Teach the DAGCombiner how to fold 'vselect' dag nodes according
to the following two rules:
1) fold (vselect (build_vector AllOnes), A, B) -> A
2) fold (vselect (build_vector AllZeros), A, B) -> B
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198777
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 8 Jan 2014 17:56:46 +0000 (17:56 +0000)]
Add missing rename from the previous commit.
No idea how this was compiling locally. Found by the bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198775
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 8 Jan 2014 17:43:26 +0000 (17:43 +0000)]
Rename get to getStorage and getError to getErrorStorage.
These private functions return pointers to the internal storage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198774
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Wed, 8 Jan 2014 16:31:16 +0000 (16:31 +0000)]
Add missing test case for r198737.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198772
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Rieck [Wed, 8 Jan 2014 16:30:03 +0000 (16:30 +0000)]
Remove mention of old deleted test scripts from testing guide
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198771
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Wed, 8 Jan 2014 15:40:47 +0000 (15:40 +0000)]
[DAGCombiner] Factor duplicated rotate code into a separate function
No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198768
91177308-0d34-0410-b5e6-
96231b3b80d8