Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:42:09 +0000 (01:42 +0000)]
AsmWriter/Bitcode: MDExpression
llvm-svn: 229023
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:39:44 +0000 (01:39 +0000)]
AsmWriter/Bitcode: MDLocalVariable
llvm-svn: 229022
Zachary Turner [Fri, 13 Feb 2015 01:39:22 +0000 (01:39 +0000)]
Fix the build, I forgot to check that UnitTests still built.
llvm-svn: 229021
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:35:40 +0000 (01:35 +0000)]
AsmWriter/Bitcode: MDGlobalVariable
llvm-svn: 229020
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:34:32 +0000 (01:34 +0000)]
AsmWriter/Bitcode: MDTemplate{Type,Value}Parameter
llvm-svn: 229019
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:32:09 +0000 (01:32 +0000)]
AsmWriter/Bitcode: MDNamespace
llvm-svn: 229018
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:30:42 +0000 (01:30 +0000)]
AsmWriter/Bitcode: MDLexicalBlockFile
llvm-svn: 229017
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:29:28 +0000 (01:29 +0000)]
AsmWriter/Bitcode: MDLexicalBlock
llvm-svn: 229016
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:28:16 +0000 (01:28 +0000)]
AsmWriter: MDSubprogram: Recognize DW_VIRTUALITY in 'virtuality'
llvm-svn: 229015
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:26:47 +0000 (01:26 +0000)]
AsmWriter/Bitcode: MDSubprogram
llvm-svn: 229014
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:25:10 +0000 (01:25 +0000)]
AsmWriter/Bitcode: MDCompileUnit
llvm-svn: 229013
Zachary Turner [Fri, 13 Feb 2015 01:23:51 +0000 (01:23 +0000)]
Improve llvm-pdbdump output display.
This patch adds a number of improvements to llvm-pdbdump.
1) Dumping of the entire global scope, and not only those
symbols that live in individual compilands.
2) Prepend class name to member functions and data
3) Improved display of bitfields.
4) Support for dumping more kinds of data symbols.
llvm-svn: 229012
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:22:59 +0000 (01:22 +0000)]
AsmWriter/Bitcode: MDSubroutineType
llvm-svn: 229011
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:21:25 +0000 (01:21 +0000)]
AsmWriter: MDCompositeType: Recognize DW_LANG in 'runtimeLang'
llvm-svn: 229010
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:20:38 +0000 (01:20 +0000)]
AsmWriter/Bitcode: MDDerivedType and MDCompositeType
llvm-svn: 229009
Greg Clayton [Fri, 13 Feb 2015 01:19:24 +0000 (01:19 +0000)]
Add a ModuleList::ForEach(...) which takes the module list mutex calls the std::function argument with each module. If you return true in the callback, iteration will continue, if you return false, iteration will stop and the lock will be released.
<rdar://problem/
19213054>
llvm-svn: 229008
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:19:14 +0000 (01:19 +0000)]
AsmWriter/Bitcode: MDFile
llvm-svn: 229007
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:17:35 +0000 (01:17 +0000)]
AsmWriter: MDBasicType: Recognize DW_ATE in 'encoding'
llvm-svn: 229006
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:14:58 +0000 (01:14 +0000)]
AsmWriter/Bitcode: MDBasicType
llvm-svn: 229005
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:14:11 +0000 (01:14 +0000)]
AsmWriter/Bitcode: MDEnumerator
llvm-svn: 229004
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:10:38 +0000 (01:10 +0000)]
AsmWriter/Bitcode: MDSubrange
llvm-svn: 229003
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:07:46 +0000 (01:07 +0000)]
IR: Add MDExpression::ExprOperand
Port `DIExpression::Operand` over to `MDExpression::ExprOperand`. The
logic is needed directly in `MDExpression` to support printing in
assembly.
llvm-svn: 229002
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:05:00 +0000 (01:05 +0000)]
Support: Add dwarf::getOperationEncoding()
llvm-svn: 229001
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:04:08 +0000 (01:04 +0000)]
Support: Rewrite LocationAtom and OperationEncodingString(), NFC
Use `Dwarf.def` more.
llvm-svn: 229000
Akira Hatanaka [Fri, 13 Feb 2015 00:40:41 +0000 (00:40 +0000)]
[LinkModules] Change the way ModuleLinker merges triples.
This commit makes the following changes:
- Stop issuing a warning when the triples' string representations do not match
exactly if the Triple objects generated from the strings compare equal.
- On Apple platforms, choose the triple that has the larger minimum version
number.
rdar://problem/
16743513
Differential Revision: http://reviews.llvm.org/D7591
llvm-svn: 228999
Eric Christopher [Fri, 13 Feb 2015 00:39:38 +0000 (00:39 +0000)]
PPCFrameLowering's FramePointerOffset can be computed at initialization
time. Do so.
llvm-svn: 228998
Eric Christopher [Fri, 13 Feb 2015 00:39:36 +0000 (00:39 +0000)]
The TOC save offset can be computed at compile time, do so and
propagate changes.
llvm-svn: 228997
Eric Christopher [Fri, 13 Feb 2015 00:39:27 +0000 (00:39 +0000)]
The return save offset can be computed at initialization time - do
so and save the value.
llvm-svn: 228996
Michael Zolotukhin [Fri, 13 Feb 2015 00:35:45 +0000 (00:35 +0000)]
Testcase for r228988.
llvm-svn: 228995
Chandler Carruth [Fri, 13 Feb 2015 00:29:39 +0000 (00:29 +0000)]
[unroll] Don't use a map from pointer to bool. Use a set.
This is much more efficient. In particular, the query with the user
instruction has to insert a false for every missing instruction into the
set. This is just a cleanup a long the way to fixing the underlying
algorithm problems here.
llvm-svn: 228994
NAKAMURA Takumi [Fri, 13 Feb 2015 00:28:32 +0000 (00:28 +0000)]
Modularize.cpp: Simplify. Vector may be aware of ranged-for.
llvm-svn: 228993
NAKAMURA Takumi [Fri, 13 Feb 2015 00:28:26 +0000 (00:28 +0000)]
Modularize.cpp: Prune CRLFs.
llvm-svn: 228992
NAKAMURA Takumi [Fri, 13 Feb 2015 00:28:21 +0000 (00:28 +0000)]
clang-tools-extra/test/modularize/NoProblemsList.modularize: Unbreak test.
Don't expect the list were on the current directory.
llvm-svn: 228991
NAKAMURA Takumi [Fri, 13 Feb 2015 00:24:21 +0000 (00:24 +0000)]
Mark clang/test/CodeGen/exceptions-seh-leave.c as REQUIRES:asserts, for now.
FIXME: Rewrite CHECKs for unnamed BBs and Insts.
llvm-svn: 228990
NAKAMURA Takumi [Fri, 13 Feb 2015 00:21:34 +0000 (00:21 +0000)]
llvm/test/Transforms/LoopVectorize/PowerPC/small-loop-rdx.ll REQUIRES +Asserts due to -debug.
llvm-svn: 228989
Michael Zolotukhin [Fri, 13 Feb 2015 00:17:03 +0000 (00:17 +0000)]
Prevent division by 0.
When we try to estimate number of potentially removed instructions in
loop unroller, we analyze first N iterations and then scale the
computed number by TripCount/N. We should bail out early if N is 0.
llvm-svn: 228988
Chandler Carruth [Fri, 13 Feb 2015 00:00:24 +0000 (00:00 +0000)]
[unroll] Update the new analysis logic from r228265 to use modern coding
conventions for function names consistently. Some were already using
this but not all.
llvm-svn: 228987
Reid Kleckner [Thu, 12 Feb 2015 23:40:45 +0000 (23:40 +0000)]
SEH: Use the SEHTryEpilogueStack instead of a separate bool
We don't need a bool to track this now that we have a stack for it.
llvm-svn: 228982
Marshall Clow [Thu, 12 Feb 2015 23:34:52 +0000 (23:34 +0000)]
Move the test for zero-length into the char_traits (from string_view). Add tests to char_traits specializations
llvm-svn: 228981
Rafael Espindola [Thu, 12 Feb 2015 23:29:51 +0000 (23:29 +0000)]
Add support for having multiple sections with the same name and comdat.
Using this in combination with -ffunction-sections allows LLVM to output a .o
file with mulitple sections named .text. This saves space by avoiding long
unique names of the form .text.<C++ mangled name>.
llvm-svn: 228980
David Majnemer [Thu, 12 Feb 2015 23:26:26 +0000 (23:26 +0000)]
X86: Don't crash if we can't decode the pshufb mask
Constant pool entries are uniqued by their contents regardless of their
type. This means that a pshufb can have a shuffle mask which isn't a
simple array of bytes.
The code path which attempts to decode the mask didn't check for
failure, causing PR22559.
llvm-svn: 228979
Richard Smith [Thu, 12 Feb 2015 23:21:45 +0000 (23:21 +0000)]
[modules] When collecting declarations to complete a redeclaration chain for an
entity, put the originally-canonical decl IDs in the right places in the redecl
chain rather than reordering them all to the start. If we don't ensure that the
redecl chain order is consistent with the topological module order, we can fail
to make a declaration visible if later declarations are in more IDNSs than
earlier ones (for instance, because the earlier decls are invisible friends).
llvm-svn: 228978
Nico Weber [Thu, 12 Feb 2015 23:16:11 +0000 (23:16 +0000)]
[ms] Implement codegen for __leave.
Reviewed at http://reviews.llvm.org/D7575
llvm-svn: 228977
Rafael Espindola [Thu, 12 Feb 2015 23:11:59 +0000 (23:11 +0000)]
Learn that __DATA,__objc_classrefs is not atomized via symbols.
This should hopefully fix objc on AArch64.
llvm-svn: 228976
Enrico Granata [Thu, 12 Feb 2015 23:09:17 +0000 (23:09 +0000)]
I had recently added a new SBFrame::GetVariables() overload with yet another bool argument
We talked about it internally - and came to the conclusion that it's time to have an options class
This commit adds an SBVariablesOptions class and goes through all the required dance
llvm-svn: 228975
David Blaikie [Thu, 12 Feb 2015 22:58:53 +0000 (22:58 +0000)]
Add missing override.
llvm-svn: 228974
Olivier Sallenave [Thu, 12 Feb 2015 22:57:58 +0000 (22:57 +0000)]
Change max interleave factor to 12 for POWER7 and POWER8.
llvm-svn: 228973
Simon Pilgrim [Thu, 12 Feb 2015 22:47:45 +0000 (22:47 +0000)]
Ensure integer domain on general shuffle stack folding tests
llvm-svn: 228972
Rui Ueyama [Thu, 12 Feb 2015 22:46:16 +0000 (22:46 +0000)]
PECOFF: Fix dummy symbol table in executable.
If the name field of a symbol table entry is all zero, it's interpreted
as it's pointing to the beginning of the string table. The first four
bytes of the string table is the size field, so dumpbin dumps that number
as an ASCIZ string.
This patch fills a dummy value to name field.
llvm-svn: 228971
David Blaikie [Thu, 12 Feb 2015 22:45:25 +0000 (22:45 +0000)]
Remove typedef of a pointer type used in a gep to simplify migration of geps to a typeless-pointer future.
I'd modify my migration tool to account for this, but this is the only
instance of a typedef'd pointer type to a gep I found in the whole test
suite, so it didn't seem worthwhile.
llvm-svn: 228970
Hal Finkel [Thu, 12 Feb 2015 22:43:52 +0000 (22:43 +0000)]
[SDAG] Don't try to use FP_EXTEND/FP_ROUND for int<->fp promotions
The PowerPC backend has long promoted some floating-point vector operations
(such as select) to integer vector operations. Unfortunately, this behavior was
broken by r216555. When using FP_EXTEND/FP_ROUND for promotions, we must check
that both the old and new types are floating-point types. Otherwise, we must
use BITCAST as we did prior to r216555 for everything.
llvm-svn: 228969
Shankar Easwaran [Thu, 12 Feb 2015 22:37:27 +0000 (22:37 +0000)]
[ELF] Insert wrap symbols into a set.
Symbols specified by --wrap was being inserted into a vector, change this to
insert into a set, so that we have unique entries.
llvm-svn: 228968
Duncan P. N. Exon Smith [Thu, 12 Feb 2015 21:52:11 +0000 (21:52 +0000)]
IR: Stop abusing DW_TAG_base_type for compile unit arrays
The sub-arrays for compile units have for a long time been initialized
to distinct temporary nodes with the `DW_TAG_base_type` tag, with no
other operands. These invalid `DIBasicType`s are later replaced with
appropriate arrays.
This seems like a poor man's assertion that the arrays do eventually get
replaced. These days, temporaries in the graph will cause assertions
when writing bitcode or assembly, so this isn't necessary. Use
temporary empty tuples instead.
Note that the whole idea of using temporaries and then replacing them
later is wasteful here. We never actually want to merge compile units
by uniquing based on content. Compile units should use `getDistinct()`
instead of `get()`, and then their operands can be freely replaced later
on.
llvm-svn: 228967
Ben Langmuir [Thu, 12 Feb 2015 21:51:31 +0000 (21:51 +0000)]
Mangle the IsSystem bit into the .pcm file name
When mangling the module map path into a .pcm file name, also mangle the
IsSystem bit, which can also depend on the header search paths. For
example, the user may change from -I to -isystem. This can affect
diagnostics in the importing TU.
llvm-svn: 228966
Zachary Turner [Thu, 12 Feb 2015 21:25:58 +0000 (21:25 +0000)]
Attempt to fix the build again.
llvm-svn: 228964
Richard Smith [Thu, 12 Feb 2015 21:23:20 +0000 (21:23 +0000)]
Fix typoo.
llvm-svn: 228963
Zachary Turner [Thu, 12 Feb 2015 21:17:07 +0000 (21:17 +0000)]
Attempt to fix Linux builds after r228960.
llvm-svn: 228962
Rafael Espindola [Thu, 12 Feb 2015 21:16:34 +0000 (21:16 +0000)]
Remove mostly unused setters.
Most of the code was setting the TargetOptions directly.
llvm-svn: 228961
Zachary Turner [Thu, 12 Feb 2015 21:09:24 +0000 (21:09 +0000)]
Add concrete type overloads to PDBSymbol::findChildren().
Frequently you only want to iterate over children of a specific
type (e.g. functions). Previously you would get back a generic
interface that allowed iteration over the base symbol type,
which you would have to dyn_cast<> each one of. With this patch,
we allow the user to specify the concrete type as a template
parameter, and it will return an iterator which returns instances
of the concrete type directly.
llvm-svn: 228960
David Majnemer [Thu, 12 Feb 2015 21:07:34 +0000 (21:07 +0000)]
Sema: Semantically check _Atomic-qualified pointers
This fixes PR22568.
llvm-svn: 228959
Reed Kotler [Thu, 12 Feb 2015 21:05:12 +0000 (21:05 +0000)]
Add bulk of returning of values to Mips fast-isel
Summary:
Implement the bulk of returning values in Mips fast-isel
Test Plan:
reatabi.ll
Passes test-suite at -O0,-O2 and with mips32r2 and mips32r1.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits, aemerson, rfuhler
Differential Revision: http://reviews.llvm.org/D5920
llvm-svn: 228958
Bjorn Steinbrink [Thu, 12 Feb 2015 21:04:22 +0000 (21:04 +0000)]
Fix a crash in the assumption cache when inlining indirect function calls
Summary:
Instances of the AssumptionCache are per function, so we can't re-use
the same AssumptionCache instance when recursing in the CallAnalyzer to
analyze a different function. Instead we have to pass the
AssumptionCacheTracker to the CallAnalyzer so it can get the right
AssumptionCache on demand.
Reviewers: hfinkel
Subscribers: llvm-commits, hans
Differential Revision: http://reviews.llvm.org/D7533
llvm-svn: 228957
Benjamin Kramer [Thu, 12 Feb 2015 20:40:19 +0000 (20:40 +0000)]
Update test case.
llvm-svn: 228956
Rui Ueyama [Thu, 12 Feb 2015 20:33:40 +0000 (20:33 +0000)]
PECOFF: Don't parse files in .drectve asynchronously.
Looks like there's a race condition around here that caused LLD to crash
on Windows. Currently we are parsing libraries specified by .drectve section
asynchronously, and something is wrong in that process. Disable the feature
for now to make buildbots happy.
llvm-svn: 228955
Benjamin Kramer [Thu, 12 Feb 2015 20:26:46 +0000 (20:26 +0000)]
InstCombine: Allow folding of xor into icmp by changing the predicate for vectors
The loop vectorizer can create this pattern.
llvm-svn: 228954
Simon Pilgrim [Thu, 12 Feb 2015 20:01:03 +0000 (20:01 +0000)]
Relaxed over-zealous alignment requirement for VEX-encoded AES instructions
llvm-svn: 228953
Marshall Clow [Thu, 12 Feb 2015 19:58:06 +0000 (19:58 +0000)]
Fixed a problem that UBSAN found, where we were calling memcmp(null, p, 0) - which is undefined behavior
llvm-svn: 228952
Michael Zolotukhin [Thu, 12 Feb 2015 19:57:24 +0000 (19:57 +0000)]
Add a testcase for r228432.
llvm-svn: 228951
Benjamin Kramer [Thu, 12 Feb 2015 19:53:49 +0000 (19:53 +0000)]
Try to fix the MSVC build.
0xFFFFFFFFFFFFFFFFLL doesn't fit in a long long so it should have
type 'unsigned long long'. MSVC thinks it's a (signed) __int64.
llvm-svn: 228950
Michael Kuperstein [Thu, 12 Feb 2015 18:21:50 +0000 (18:21 +0000)]
gold-plugin: delete the output file for OT_DISABLE
bfd creates the output file early, so calling exit(0) is not enough, the file needs to be explicitly deleted.
Patch by: H.J. Lu <hjl.tools@gmail.com>
llvm-svn: 228946
Gabor Horvath [Thu, 12 Feb 2015 18:19:34 +0000 (18:19 +0000)]
[clang-tidy] Fixed a false positive case in misc-inefficient-algorithm checker.
llvm-svn: 228945
Tamas Berghammer [Thu, 12 Feb 2015 18:18:27 +0000 (18:18 +0000)]
Add Initialize/Terminate method to Platform base plugin
Platform holds a smart pointer to each platform object created in a
static variable what cause the platform destructors called only on
program exit when other static variables are not availables. With this
change the destructors are called on lldb_private::Terminate()
+ Fix DebuggerRefCount handling in ScriptInterpreterPython
Differential Revision: http://reviews.llvm.org/D7590
llvm-svn: 228944
Tamas Berghammer [Thu, 12 Feb 2015 18:13:44 +0000 (18:13 +0000)]
Create new platform: remote-android
* Create new platform plugin for lldb
* Create HostInfo class for android
* Create ProcessLauncher for android
Differential Revision: http://reviews.llvm.org/D7584
llvm-svn: 228943
John Thompson [Thu, 12 Feb 2015 17:52:28 +0000 (17:52 +0000)]
Fix broken test in separate build tree.
llvm-svn: 228941
Rafael Espindola [Thu, 12 Feb 2015 17:46:49 +0000 (17:46 +0000)]
On ELF, put PIC jump tables in a non executable section.
Fixes PR22558.
llvm-svn: 228939
Jim Ingham [Thu, 12 Feb 2015 17:37:46 +0000 (17:37 +0000)]
Add an -A option to "break set -p" to search all files for matches. Also add the version of
SBTarget::BreakpointCreateBySourceRegex that takes file spec lists to the Python interface,
and add a test for this.
<rdar://problem/
19805037>
llvm-svn: 228938
Rafael Espindola [Thu, 12 Feb 2015 17:16:46 +0000 (17:16 +0000)]
Put each jump table in an independent section if the function is too.
This allows the linker to GC both, fixing pr22557.
llvm-svn: 228937
Benjamin Kramer [Thu, 12 Feb 2015 16:30:00 +0000 (16:30 +0000)]
Fix accidental bit flip.
llvm-svn: 228936
John Thompson [Thu, 12 Feb 2015 16:22:09 +0000 (16:22 +0000)]
Added support for multiple header list files, as a precursor for when we need to load multiple module maps.
llvm-svn: 228935
Benjamin Kramer [Thu, 12 Feb 2015 16:18:07 +0000 (16:18 +0000)]
CoverageMapping: Bitvectorize code. No functionality change.
llvm-svn: 228934
Benjamin Kramer [Thu, 12 Feb 2015 16:16:56 +0000 (16:16 +0000)]
Update after LLVM API change.
llvm-svn: 228933
Hafiz Abid Qadeer [Thu, 12 Feb 2015 16:06:03 +0000 (16:06 +0000)]
Fix the test on Linux.
The exception name that is thrown in Linux is different.
I have |ed it to the already existing one.
llvm-svn: 228932
James Molloy [Thu, 12 Feb 2015 15:54:14 +0000 (15:54 +0000)]
[LoopRerolling] Be more forgiving with instruction order.
We can't solve the full subgraph isomorphism problem. But we can
allow obvious cases, where for example two instructions of different
types are out of order. Due to them having different types/opcodes,
there is no ambiguity.
llvm-svn: 228931
Benjamin Kramer [Thu, 12 Feb 2015 15:35:40 +0000 (15:35 +0000)]
MathExtras: Bring Count(Trailing|Leading)Ones and CountPopulation in line with countTrailingZeros
Update all callers.
llvm-svn: 228930
John Thompson [Thu, 12 Feb 2015 15:26:17 +0000 (15:26 +0000)]
Fixed incorrect header inclusion tracking resulting in false error reports.
llvm-svn: 228929
Marshall Clow [Thu, 12 Feb 2015 15:25:54 +0000 (15:25 +0000)]
Remove undefined behavior from test; specifically, compare(NULL, XXX, 0)
llvm-svn: 228928
Marshall Clow [Thu, 12 Feb 2015 15:21:20 +0000 (15:21 +0000)]
Remove undefined behavior from test; specifically, compare(NULL, XXX, 0). Thanks to Eric for the catch
llvm-svn: 228927
Tim Northover [Thu, 12 Feb 2015 15:12:13 +0000 (15:12 +0000)]
Triple: refactor redundant code.
Should be no functional change, since most of the logic removed was
completely pointless (after some previous refactoring) and the rest
duplicated elsewhere.
Patch by Kamil Rytarowski.
llvm-svn: 228926
Pavel Labath [Thu, 12 Feb 2015 14:43:35 +0000 (14:43 +0000)]
Re-add makefiles of inline tests
llvm-svn: 228925
Michael Kuperstein [Thu, 12 Feb 2015 14:17:35 +0000 (14:17 +0000)]
[X86] Call frame optimization - allow stack-relative movs to be folded into a push
Since we track esp precisely, there's no reason not to allow this.
llvm-svn: 228924
Andrea Di Biagio [Thu, 12 Feb 2015 14:17:24 +0000 (14:17 +0000)]
[TTI] Teach the cost heuristic how to query TLI to check if a zext/trunc is 'free' for the target.
Now that SimplifyCFG uses TTI for the cost heuristic, we can teach BasicTTIImpl
how to query TLI in order to get a more accurate cost for truncates and
zero-extends.
Before this patch, the basic cost heuristic in TargetTransformInfoImplCRTPBase
would have conservatively returned a 'default' TCC_Basic for all zero-extends,
and TCC_Free for truncates on native types.
This patch improves the heuristic so that we query TLI (if available) to get
more accurate answers. If TLI is available, then methods 'isZExtFree' and
'isTruncateFree' can be used to check if a zext/trunc is free for the target.
Added more test cases to SimplifyCFG/X86/speculate-cttz-ctlz.ll.
With this change, SimplifyCFG is now able to speculate a 'cheap' cttz/ctlz
immediately followed by a free zext/trunc.
Differential Revision: http://reviews.llvm.org/D7585
llvm-svn: 228923
Benjamin Kramer [Thu, 12 Feb 2015 14:02:58 +0000 (14:02 +0000)]
BitVector: Remove manual bit width dispatch, this is handled by templates
NFC.
llvm-svn: 228922
Benjamin Kramer [Thu, 12 Feb 2015 13:47:29 +0000 (13:47 +0000)]
MathExtras: Parametrize count(Trailing|Leading)Zeros on the type size.
Otherwise we will always select the generic version for e.g. unsigned
long if uint64_t is typedef'd to 'unsigned long long'. Also remove
enable_if hacks in favor of static_assert.
llvm-svn: 228921
Asiri Rathnayake [Thu, 12 Feb 2015 13:37:28 +0000 (13:37 +0000)]
ARM: Fix another regression introduced in r223113
The changes in r223113 (ARM modified-immediate syntax) have broken
instructions like:
mov r0, #~0xffffff00
The problem is that I've added a spurious range check on the immediate
operand to ensure that it lies between INT32_MIN and UINT32_MAX. While
this range check is correct in theory, it causes problems because the
operand is stored in an int64_t (by MC). So valid 32-bit constants like
\#~0xffffff00 become out of range. The solution is to simply remove this
range check. It is not possible to validate the range of the immediate
operand with the current setup because: 1) The operand is stored in an
int64_t by MC, 2) The immediate can be of the forms #imm, #-imm, #~imm
or even #((~imm)) etc. So we just chop the value to 32 bits and use it.
Also noted that the original range check was note tested by any of the
unit tests. I've added a new test to cover #~imm kind of operands.
Change-Id: I411e90d84312a2eff01b732bb238af536c4a7599
llvm-svn: 228920
Greg Bedwell [Thu, 12 Feb 2015 12:41:28 +0000 (12:41 +0000)]
Fix dependency generation crash test to run clang and clean up after itself.
Previously the test did not have a RUN: prefix for the clang command.
In addition it was leaving behind a tmp file with no permissions causing issues when
deleting the build directory on Windows.
Differential Revision: http://reviews.llvm.org/D7534
llvm-svn: 228919
Vasileios Kalintiris [Thu, 12 Feb 2015 11:36:56 +0000 (11:36 +0000)]
[mips] Partially revert r223927: Removing __SIZEOF_INT128__ macro for MIPS64
Partially revert r223927 because LLVM gained support for 128-bit integers
in r227089. Modify and keep the tests that verify the definition of the
macro __SIZEOF_INT128__ for MIPS64 BE & LE in the preprocessor.
llvm-svn: 228918
Dmitry Vyukov [Thu, 12 Feb 2015 09:55:28 +0000 (09:55 +0000)]
tsan: do not instrument not captured values
I've built some tests in WebRTC with and without this change. With this change number of __tsan_read/write calls is reduced by 20-40%, binary size decreases by 5-10% and execution time drops by ~5%. For example:
$ ls -l old/modules_unittests new/modules_unittests
-rwxr-x--- 1 dvyukov
41708976 Jan 20 18:35 old/modules_unittests
-rwxr-x--- 1 dvyukov
38294008 Jan 20 18:29 new/modules_unittests
$ objdump -d old/modules_unittests | egrep "callq.*__tsan_(read|write|unaligned)" | wc -l
239871
$ objdump -d new/modules_unittests | egrep "callq.*__tsan_(read|write|unaligned)" | wc -l
148365
http://reviews.llvm.org/D7069
llvm-svn: 228917
Elena Demikhovsky [Thu, 12 Feb 2015 08:40:34 +0000 (08:40 +0000)]
AVX-512: Fixed the "test" operation for i1 type
Using KORTESTW for comparison i1 value with zero was wrong since the instruction tests 16 bits.
KORTESTW may be used with KSHIFTL+KSHIFTR that clean the 15 upper bits.
I removed (X86cmp i1, 0) pattern and zero-extend i1 to i8 and then use TESTB.
There are some cases where i1 is in the mask register and the upper bits are already zeroed.
Then KORTESTW is the better solution, but it is subject for optimization.
Meanwhile, I'm fixing the correctness issue.
llvm-svn: 228916
Michael Kuperstein [Thu, 12 Feb 2015 08:36:35 +0000 (08:36 +0000)]
[X86] A heuristic to estimate the size impact for converting stack-relative parameter movs to pushes
This gives a rough estimate of whether using pushes instead of movs is profitable, in terms of size.
We go over all calls in the MachineFunction and compute:
a) For each callsite that can not use pushes, the penalty of not having a reserved call frame.
b) For each callsite that can use pushes, the gain of actually replacing the movs with pushes (and the potential penalty of having to readjust the stack).
Differential Revision: http://reviews.llvm.org/D7561
llvm-svn: 228915
Tobias Grosser [Thu, 12 Feb 2015 08:27:19 +0000 (08:27 +0000)]
Link LLVM libraries into libLLVMPolly if BUILD_SHARED_LIBS=ON is set
Without this change we get linker errors such as:
undefined reference to `llvm::dbgs()'
We only conditionally link in these libraries, as in BUILD_SHARED_LIBS=OFF mode,
linking in these libraries causes such functions (and especially global options)
to be defined twice. The "solution" I choose is most likely not ideal, but seems
to work. If any cmake specialist can suggest a better approach, this would be
appreciated.
We also drop a .c file that is not needed as it caused linker errors as well.
llvm-svn: 228914