Pedro Artigas [Fri, 30 Nov 2012 22:47:15 +0000 (22:47 +0000)]
reversed the logic of the log2 detection routine to reduce the number of nested ifs
llvm-svn: 169049
Nadav Rotem [Fri, 30 Nov 2012 22:37:11 +0000 (22:37 +0000)]
minor cleanups
llvm-svn: 169048
Alexey Samsonov [Fri, 30 Nov 2012 22:27:54 +0000 (22:27 +0000)]
Fix a bug in APFloat.cpp: declare APFloat after fltSemantics it
uses. APFloat::convert() takes the pointer to the fltSemantics
variable, which is later accessed it in ~APFloat() desctructor.
That is, semantics must still be alive at the moment we delete
APFloat.
Found by experimental AddressSanitizer use-after-scope checker.
llvm-svn: 169047
Bill Wendling [Fri, 30 Nov 2012 22:15:08 +0000 (22:15 +0000)]
Add me as LTO code owner.
llvm-svn: 169046
Douglas Gregor [Fri, 30 Nov 2012 22:11:57 +0000 (22:11 +0000)]
Rename ModuleBuildPath -> ModuleBuildStack. Thanks, Dmitri!
llvm-svn: 169045
Bill Wendling [Fri, 30 Nov 2012 22:08:55 +0000 (22:08 +0000)]
Replace r168930 with a more reasonable patch.
The original patch removed a bunch of code that the SjLjEHPrepare pass placed
into the entry block if all of the landing pads were removed during the
CodeGenPrepare class. The more natural way of doing things is to run the CGP
*before* we run the SjLjEHPrepare pass.
Make it so!
llvm-svn: 169044
Pedro Artigas [Fri, 30 Nov 2012 22:07:05 +0000 (22:07 +0000)]
Addresses many style issues with prior checkin (r169025)
llvm-svn: 169043
Douglas Gregor [Fri, 30 Nov 2012 21:58:49 +0000 (21:58 +0000)]
When we're emitting a diagnostic with a source location in an imported
module, provide a module import stack similar to what we would get for
an include stack, e.g.,
In module 'DependsOnModule' imported from build-fail-notes.m:4:
In module 'Module' imported from DependsOnModule.framework/Headers/DependsOnModule.h:1:
Inputs/Module.framework/Headers/Module.h:15:12: note: previous definition is here
@interface Module
<rdar://problem/
12696425>
llvm-svn: 169042
Aaron Ballman [Fri, 30 Nov 2012 21:44:01 +0000 (21:44 +0000)]
Fixing a precedence issue with my previous commit.
llvm-svn: 169041
Jakob Stoklund Olesen [Fri, 30 Nov 2012 21:42:47 +0000 (21:42 +0000)]
Add a -time-compilations=<N> option to llc.
This causes llc to repeat the module compilation N times, making it
possible to get more accurate information from -time-passes when
compiling small modules.
llvm-svn: 169040
Jakob Stoklund Olesen [Fri, 30 Nov 2012 21:42:45 +0000 (21:42 +0000)]
Aggregate pass execution time report by pass ID instead of pass instance.
This avoids unidentified duplicates in the pass execution time report
when a pass runs more than once in the pass manager pipeline.
llvm-svn: 169039
Daniel Dunbar [Fri, 30 Nov 2012 21:34:04 +0000 (21:34 +0000)]
lit: Add a simple test suite for checking test runner parallelism.
llvm-svn: 169038
Aaron Ballman [Fri, 30 Nov 2012 21:15:20 +0000 (21:15 +0000)]
Fixing an MSVC warning about an unsafe mixture of Boolean and unsigned types in a logical operator.
llvm-svn: 169037
Michael J. Spencer [Fri, 30 Nov 2012 21:02:29 +0000 (21:02 +0000)]
[CMake] Add support for selecting which c++ abi library to use.
llvm-svn: 169036
Jim Ingham [Fri, 30 Nov 2012 20:23:19 +0000 (20:23 +0000)]
Save and restore terminal state when lldb is suspended with SIGTSTP and resumed with SIGCONT.
Readline & gdb have a bunch of code to handle older UNIX'es with other job control mechanisms.
I didn't try to replicate that.
llvm-svn: 169032
Enrico Granata [Fri, 30 Nov 2012 20:15:16 +0000 (20:15 +0000)]
<rdar://problem/
12676084> Dump the traceback when a Python error occurs in "command script import" and the exception is not an ImportError
llvm-svn: 169031
Dmitri Gribenko [Fri, 30 Nov 2012 20:04:39 +0000 (20:04 +0000)]
Comments: no need to escape any characters in \code ... \endcode.
llvm-svn: 169030
Dmitry Vyukov [Fri, 30 Nov 2012 20:02:11 +0000 (20:02 +0000)]
tsan: fix int overflow and several instances where tid is used with ignore
llvm-svn: 169029
Aaron Ballman [Fri, 30 Nov 2012 19:52:30 +0000 (19:52 +0000)]
Support for #pragma region/endregion for MSVC compatibility. Patch thanks to pravic!
llvm-svn: 169028
Douglas Gregor [Fri, 30 Nov 2012 19:28:05 +0000 (19:28 +0000)]
Actually keep track of the source locations at which particular module
files are loaded.
llvm-svn: 169027
Chad Rosier [Fri, 30 Nov 2012 19:15:10 +0000 (19:15 +0000)]
test/CodeGen/PowerPC/vec_mul.ll: Add a triple. Thanks, Hal.
llvm-svn: 169026
Pedro Artigas [Fri, 30 Nov 2012 19:09:41 +0000 (19:09 +0000)]
Add fast math inst combine X*log2(Y*0.5)-->X*log2(Y)-X
reviewed by Michael Ilseman <milseman@apple.com>
llvm-svn: 169025
Sebastian Pop [Fri, 30 Nov 2012 19:08:04 +0000 (19:08 +0000)]
Codegen failure for vmull with small vectors
Codegen was failing with an assertion because of unexpected vector
operands when legalizing the selection DAG for a MUL instruction.
The asserting code was legalizing multiplies for vectors of size 128
bits. It uses a custom lowering to try and detect cases where it can
use a VMULL instruction instead of a VMOVL + VMUL. The code was
looking for input operands to the MUL that had been sign or zero
extended. If it found the extended operands it would drop the
sign/zero extension and use the original vector size as input to a
VMULL instruction.
The code assumed that the original input vector was 64 bits so that
after dropping the extension it would fit directly into a D register
and could be used as an operand of a VMULL instruction. The input
code that trigger the failure used a vector of <4 x i8> that was
sign extended to <4 x i32>. It was not safe to drop the sign
extension in this case because the original vector is only 32 bits
wide. The fix is to insert a sign extension for the vector to reach
the required 64 bit size. In this particular example, the vector would
need to be sign extented to a <4 x i16>.
llvm-svn: 169024
Greg Clayton [Fri, 30 Nov 2012 19:05:35 +0000 (19:05 +0000)]
Added new options to "target create" and "target modules add".
For "target create" you can now specify "--no-dependents" to not track down and add all dependent shared libraries. This can be handy when doing manual symbolication. Also added the "--symfile" or "-s" for short so you can specify a module and a stand alone debug info file:
(lldb) target create --symfile /tmp/a.dSYM /usr/bin/a
Added the "--symfile" option to the "target modules add" for the same reason. These all help with manualy symbolication and expose functionality that was previously only available through the public API layer.
llvm-svn: 169023
Howard Hinnant [Fri, 30 Nov 2012 18:43:50 +0000 (18:43 +0000)]
__list::ends_with_template was giving the wrong answer for empty lists. And __parse_unnamed_type_name wasn't properly handling the list of paramters and was not safe against incorrectly mangled lambdas (running past last).
llvm-svn: 169022
Douglas Gregor [Fri, 30 Nov 2012 18:38:50 +0000 (18:38 +0000)]
When an error occurs while building a module on demand, provide "While
building module 'Foo' imported from..." notes (the same we we provide
"In file included from..." notes) in the diagnostic, so that we know
how this module got included in the first place. This is part of
<rdar://problem/
12696425>.
llvm-svn: 169021
Chad Rosier [Fri, 30 Nov 2012 18:29:01 +0000 (18:29 +0000)]
test/CodeGen/PowerPC/vec_mul.ll: Fix register operands.
llvm-svn: 169020
Dmitry Vyukov [Fri, 30 Nov 2012 17:45:53 +0000 (17:45 +0000)]
tsan: suppress weird race reports when JVM is embed into the process
llvm-svn: 169019
Jyotsna Verma [Fri, 30 Nov 2012 17:31:52 +0000 (17:31 +0000)]
Use multiclass for the load instructions with MEMri operand.
llvm-svn: 169018
Dmitry Vyukov [Fri, 30 Nov 2012 17:27:58 +0000 (17:27 +0000)]
tsan: add __libc_memalign interceptor (used by dynamic loader to allocate tls for dlopen'ed modules)
llvm-svn: 169017
Nadav Rotem [Fri, 30 Nov 2012 17:27:53 +0000 (17:27 +0000)]
Remove the use of LPPassManager. We can remove LPM because we dont need to run any additional loop passes on the new vector loop.
llvm-svn: 169016
Dmitry Vyukov [Fri, 30 Nov 2012 17:26:50 +0000 (17:26 +0000)]
tsan: add sanity checks into memory allocator
llvm-svn: 169015
Eli Bendersky [Fri, 30 Nov 2012 14:22:14 +0000 (14:22 +0000)]
Clean up whitespace and add comments
llvm-svn: 169002
Eli Bendersky [Fri, 30 Nov 2012 13:51:33 +0000 (13:51 +0000)]
Make FileCheck return 2 in case of an error as documented,
instead of 1 or true (?!)
llvm-svn: 169001
Manuel Klimek [Fri, 30 Nov 2012 13:45:19 +0000 (13:45 +0000)]
Allow matchers to access the ASTContext.
Patch by Edwin Vane.
llvm-svn: 169000
NAKAMURA Takumi [Fri, 30 Nov 2012 13:28:31 +0000 (13:28 +0000)]
test/CodeGen/PowerPC: Add explicit -march=ppc32.
FIXME: Please add another RUN line if you would like to check also on ppc64.
llvm-svn: 168999
Adhemerval Zanella [Fri, 30 Nov 2012 13:05:44 +0000 (13:05 +0000)]
This patch fixes the Altivec addend construction for the fused multiply-add
instruction (vmaddfp) to conform with IEEE to ensure the sign of a zero
result when resulting product is -0.0.
The -0.0 vector addend to vmaddfp is generated by a creating a vector
with full bits sets and then shifting each elements by 31-bits to the
left, resulting in a vector of 0x80000000 (or -0.0 as float).
The 'buildvec_canonicalize.ll' was adjusted to reflect this change and
the 'vec_mul.ll' was complemented with the float vector multiplication
test.
llvm-svn: 168998
Evgeniy Stepanov [Fri, 30 Nov 2012 12:12:20 +0000 (12:12 +0000)]
[msan] Tests for vector manipulation instructions.
llvm-svn: 168997
Chandler Carruth [Fri, 30 Nov 2012 11:45:22 +0000 (11:45 +0000)]
Switch LLVM_USE_RVALUE_REFERENCES to LLVM_HAS_RVALUE_REFERENCES.
Rationale:
1) This was the name in the comment block. ;]
2) It matches Clang's __has_feature naming convention.
3) It matches other compiler-feature-test conventions.
Sorry for the noise. =]
I've also switch the comment block to use a \brief tag and not duplicate
the name.
llvm-svn: 168996
Kostya Serebryany [Fri, 30 Nov 2012 11:08:59 +0000 (11:08 +0000)]
[asan] simplify the code around doesNotReturn call. It now magically works.
llvm-svn: 168995
Chandler Carruth [Fri, 30 Nov 2012 11:04:44 +0000 (11:04 +0000)]
Update to reflect the change of macro name in r168993.
llvm-svn: 168994
Chandler Carruth [Fri, 30 Nov 2012 11:04:18 +0000 (11:04 +0000)]
Separate out the tests for whether the compiler suports R-value
references from whether it supports an R-value reference *this. No
version of GCC today supports the latter, which breaks GCC C++11
compiles of LLVM and Clang now.
Also add doxygen comments clarifying what's going on here, and update
the usage in Optional. I'll update the usages in Clang next.
llvm-svn: 168993
Kostya Serebryany [Fri, 30 Nov 2012 10:41:42 +0000 (10:41 +0000)]
[asan] make asan_test.cc more gcc-friendly
llvm-svn: 168992
Patrik Hagglund [Fri, 30 Nov 2012 10:06:59 +0000 (10:06 +0000)]
More strict error checking in parseSpecifier + simplified code.
For example, don't allow empty strings to be passed to getInt.
Move asserts inside parseSpecifier. (One day we may want to pass parse
error messages to the user - from LLParser - instead of using asserts,
but keep the code simple until then. There have been an attempt to do
this. See r142288, which got reverted, and r142605.)
llvm-svn: 168991
Kostya Serebryany [Fri, 30 Nov 2012 09:52:44 +0000 (09:52 +0000)]
[asan] simplify break_optimization in tests (Jakub Jelinek)
llvm-svn: 168990
Chandler Carruth [Fri, 30 Nov 2012 09:34:29 +0000 (09:34 +0000)]
Fix non-determinism introduced in r168970 and pointed out by Duncan.
We're iterating over a non-deterministically ordered container looking
for two saturating flags. To do this correctly, we have to saturate
both, and only stop looping if both saturate to their final value.
Otherwise, which flag we see first changes the result.
This is also a micro-optimization of the previous version as now we
don't go into the (possibly expensive) test logic once the first
violation of either constraint is detected.
llvm-svn: 168989
Chandler Carruth [Fri, 30 Nov 2012 09:26:25 +0000 (09:26 +0000)]
Rearrange the comments, control flow, and variable names; no
functionality changed.
Evan's commit r168970 moved the code that the primary comment in this
function referred to to the other end of the function without moving the
comment, and there has been a steady creep of "boolean" logic in it that
is simpler if handled via early exit. That way each special case can
have its own comments. I've also made the variable name a bit more
explanatory than "AllFit". This is in preparation to fix the
non-deterministic output of this function.
llvm-svn: 168988
Dmitry Vyukov [Fri, 30 Nov 2012 06:50:15 +0000 (06:50 +0000)]
tsan: intercept mlock() because of the kernel bug
llvm-svn: 168987
Eric Christopher [Fri, 30 Nov 2012 06:47:06 +0000 (06:47 +0000)]
Add the rest of the experimental fission sections to MC.
llvm-svn: 168986
Dmitry Vyukov [Fri, 30 Nov 2012 06:39:01 +0000 (06:39 +0000)]
tsan: fix bug that leads to spurious use-after-free reports
llvm-svn: 168985
Eli Friedman [Fri, 30 Nov 2012 06:19:40 +0000 (06:19 +0000)]
Fix the computation of highlight ranges so we produce something sane when
the beginning and end of the range are in different macro arguments.
PR14399.
llvm-svn: 168984
Jyotsna Verma [Fri, 30 Nov 2012 06:10:22 +0000 (06:10 +0000)]
Use multiclass for the store instructions with MEMri operand.
llvm-svn: 168983
Richard Smith [Fri, 30 Nov 2012 05:11:39 +0000 (05:11 +0000)]
Refactor to reduce duplication in handling of special member functions. No functionality change.
llvm-svn: 168977
Jyotsna Verma [Fri, 30 Nov 2012 04:19:09 +0000 (04:19 +0000)]
Use multiclass for the load instructions with 'base + register offset'
addressing mode.
llvm-svn: 168976
Meador Inge [Fri, 30 Nov 2012 04:05:06 +0000 (04:05 +0000)]
Move library call simplification statistic to instcombine
The simplify-libcalls pass maintained a statistic to count the number
of library calls that have been simplified. Now that library call
simplification is being carried out in instcombine the statistic should
be moved to there.
llvm-svn: 168975
Chandler Carruth [Fri, 30 Nov 2012 03:08:41 +0000 (03:08 +0000)]
Move the InstVisitor utility into VMCore where it belongs. It heavily
depends on the IR infrastructure, there is no sense in it being off in
Support land.
This is in preparation to start working to expand InstVisitor into more
special-purpose visitors that are still generic and can be re-used
across different passes. The expansion will go into the Analylis tree
though as nothing in VMCore needs it.
llvm-svn: 168972
Evan Cheng [Fri, 30 Nov 2012 02:02:42 +0000 (02:02 +0000)]
Fix logic to determine whether to turn a switch into a lookup table. When
the tables cannot fit in registers (i.e. bitmap), do not emit the table
if it's using an illegal type.
rdar://
12779436
llvm-svn: 168970
Quentin Colombet [Fri, 30 Nov 2012 01:34:36 +0000 (01:34 +0000)]
Add a test case for the new cortex-a5 switch
llvm-svn: 168968
Jordan Rose [Fri, 30 Nov 2012 01:15:32 +0000 (01:15 +0000)]
Use the new LLVM_LVALUE_FUNCTION to ban two getAs() calls on rvalues.
If 'x' is a temporary, x.getAs<Foo>() may not be safe if the result is
supposed to persist (if its address is stored somewhere). Since getAs()
can return a null value, the result is almost always stored into a
variable, which of course is not safe when the original value dies.
This has caused several bugs with GCC's "Temporaries May Vanish Sooner Than
You Expect" optimization; in C++11 builds, at least, we'll be able to catch
these problems now.
I would suggest applying these to other getAs() and get*As() methods
(castAs is "better" because sometimes the result is used directly, which
means the temporary will still be live), but these two have both caused
trouble in the analyzer in the past.
llvm-svn: 168967
Tobias Grosser [Fri, 30 Nov 2012 01:05:05 +0000 (01:05 +0000)]
Remove unneeded preservation and restore of ValueMap and ClastVars in GPGPU code
generation.
We don't use the exact same way to build loop body for GPGPU codegen as openmp
codegen and other transformations do currently, in which cases 'createLoop'
function is called recursively. GPGPU codegen may fail due to improper restore
of ValueMap and ClastVars .
Contributed by: Yabin Hu <yabin.hwu@gmail.com>
llvm-svn: 168966
Preston Briggs [Fri, 30 Nov 2012 00:44:47 +0000 (00:44 +0000)]
Modified dump() to provide a little
more information for dependences between
instructions that don't share a common loop.
Updated the test results appropriately.
llvm-svn: 168965
Tobias Grosser [Fri, 30 Nov 2012 00:39:49 +0000 (00:39 +0000)]
Add an additional input argument according to chanages of function polly::createLoop.
Contributed-by: Yabin Hu <yabin.hwu@gmail.com>
llvm-svn: 168964
Jordan Rose [Fri, 30 Nov 2012 00:38:53 +0000 (00:38 +0000)]
Add a new C++11 compatibility macro, LLVM_LVALUE_FUNCTION.
This expands to '&', and is intended to be used when an /optional/ rvalue
override is available.
Before:
void foo() const { ... }
After:
void foo() const LLVM_LVALUE_FUNCTION { ... }
void foo() && { ... }
This is used to allow moving the contents of an Optional.
llvm-svn: 168963
Douglas Gregor [Fri, 30 Nov 2012 00:01:57 +0000 (00:01 +0000)]
Fix unit tests for ModuleLoader change in r168961.
llvm-svn: 168962
Douglas Gregor [Thu, 29 Nov 2012 23:55:25 +0000 (23:55 +0000)]
Keep track of modules that have failed to build. If we encounter an
import of that module elsewhere, don't try to build the module again:
it won't work, and the experience is quite dreadful. We track this
information somewhat globally, shared among all of the related
CompilerInvocations used to build modules on-the-fly, so that a
particular Clang instance will only try to build a given module once.
Fixes <rdar://problem/
12552849>.
llvm-svn: 168961
Kevin Enderby [Thu, 29 Nov 2012 23:47:11 +0000 (23:47 +0000)]
Fixed the arm disassembly of invalid BFI instructions to not build a bad MCInst
which would then cause an assert when printed. rdar://
11437956
llvm-svn: 168960
Eli Friedman [Thu, 29 Nov 2012 23:21:04 +0000 (23:21 +0000)]
Fix a small calling-convention bug for x86-32. PR14453.
llvm-svn: 168959
Quentin Colombet [Thu, 29 Nov 2012 23:15:27 +0000 (23:15 +0000)]
Add ARM cortex-a5 subtarget
llvm-svn: 168958
Richard Smith [Thu, 29 Nov 2012 23:09:57 +0000 (23:09 +0000)]
Remove out-of-date comment.
llvm-svn: 168957
Quentin Colombet [Thu, 29 Nov 2012 23:07:08 +0000 (23:07 +0000)]
Revert commit revision r168953, to change the commit message, which was empty
llvm-svn: 168956
Richard Smith [Thu, 29 Nov 2012 23:03:58 +0000 (23:03 +0000)]
ubsan: Disable __int128 tests if the host Clang does not support it. These
tests will still fail if compiler-rt was built with a compiler without __int128
support, but the host compiler has __int128 support.
llvm-svn: 168955
Quentin Colombet [Thu, 29 Nov 2012 22:58:40 +0000 (22:58 +0000)]
(no commit message)
llvm-svn: 168953
Eric Christopher [Thu, 29 Nov 2012 22:56:13 +0000 (22:56 +0000)]
More comment.
llvm-svn: 168952
Alexey Samsonov [Thu, 29 Nov 2012 22:56:01 +0000 (22:56 +0000)]
[ASan] use brand new -fsanitize= values for init-order/use-after-return ASan output tests
llvm-svn: 168951
Alexey Samsonov [Thu, 29 Nov 2012 22:36:21 +0000 (22:36 +0000)]
This patch exposes to Clang users three more sanitizers are experimental features of ASan:
1) init-order sanitizer: initialization-order checker.
Status: usable, but may produce false positives w/o proper blacklisting.
2) use-after-return sanitizer
Status: implemented, but heavily understed.
Should be optional, as it significanlty slows program down.
3) use-after-scope sanitizer
Status: in progress.
llvm-svn: 168950
Greg Clayton [Thu, 29 Nov 2012 22:16:27 +0000 (22:16 +0000)]
<rdar://problem/
12687087>
Emit an error when using "target modules add PATH" where PATH points to a debug info only (dSYM) file.
Also added a "--uuid" option for "target modules add --uuid UUID" to locate and load a module by UUID if the host supports it.
llvm-svn: 168949
Han Ming Ong [Thu, 29 Nov 2012 22:14:45 +0000 (22:14 +0000)]
<rdar://problem/
12780259>
Prevent async and sync calls to get profile data from stomping on each other.
At the same time, don't use '$' as end delimiter per chunk of profile data.
llvm-svn: 168948
Dan Gohman [Thu, 29 Nov 2012 21:58:47 +0000 (21:58 +0000)]
Update comment for malloc being a library call now, rather than an instruction.
llvm-svn: 168946
Daniel Malea [Thu, 29 Nov 2012 21:49:15 +0000 (21:49 +0000)]
Resolve printf formatting warnings on Linux:
- use macros from inttypes.h for format strings instead of OS-specific types
Patch from Matt Kopec!
llvm-svn: 168945
Michael Ilseman [Thu, 29 Nov 2012 21:25:12 +0000 (21:25 +0000)]
copyFastMathFlags utility and test case
llvm-svn: 168943
Eli Bendersky [Thu, 29 Nov 2012 21:24:44 +0000 (21:24 +0000)]
Add a FileCheck test that makes sure two different CHECKs won't match the
same string
llvm-svn: 168942
Dan Gohman [Thu, 29 Nov 2012 21:17:26 +0000 (21:17 +0000)]
Update my email address.
llvm-svn: 168941
Chad Rosier [Thu, 29 Nov 2012 20:58:08 +0000 (20:58 +0000)]
Whitespace.
llvm-svn: 168937
Chad Rosier [Thu, 29 Nov 2012 20:56:58 +0000 (20:56 +0000)]
Fix 80-column violations.
llvm-svn: 168936
Benjamin Kramer [Thu, 29 Nov 2012 20:08:03 +0000 (20:08 +0000)]
Object: Pass the buffer name through when making a copy.
Should bring the buildbots back to life.
llvm-svn: 168935
Eli Bendersky [Thu, 29 Nov 2012 20:01:14 +0000 (20:01 +0000)]
Make the test less sensitive to DWARF emission implementation details.
Note: the ":" goes into the regex because FileCheck wrongly complains about
unbalanced brackets otherwise.
llvm-svn: 168934
Quentin Colombet [Thu, 29 Nov 2012 19:48:01 +0000 (19:48 +0000)]
Add cortex-a5 subtarget to the supported ARM architectures
llvm-svn: 168933
Justin Holewinski [Thu, 29 Nov 2012 19:42:09 +0000 (19:42 +0000)]
Cleanup recent addition of DAGTypeLegalizer::SplitVecOp_VSELECT
llvm-svn: 168932
Shuxin Yang [Thu, 29 Nov 2012 19:38:54 +0000 (19:38 +0000)]
rdar://
12100355 (part 1)
This revision attempts to recognize following population-count pattern:
while(a) { c++; ... ; a &= a - 1; ... },
where <c> and <a>could be used multiple times in the loop body.
TODO: On X8664 and ARM, __buildin_ctpop() are not expanded to a efficent
instruction sequence, which need to be improved in the following commits.
Reviewed by Nadav, really appreciate!
llvm-svn: 168931
Bill Wendling [Thu, 29 Nov 2012 19:38:06 +0000 (19:38 +0000)]
Handle the situation where CodeGenPrepare removes a reference to a BB that has
the last invoke instruction in the function. This also removes the last landing
pad in an function. This is fine, but with SjLj EH code, we've already placed a
bunch of code in the 'entry' block, which expects the landing pad to stick
around.
When we get to the situation where CGP has removed the last landing pad, go
ahead and nuke the SjLj instructions from the 'entry' block.
<rdar://problem/
12721258>
llvm-svn: 168930
Jyotsna Verma [Thu, 29 Nov 2012 19:35:44 +0000 (19:35 +0000)]
Use multiclass for 'transfer' instructions.
llvm-svn: 168929
Nadav Rotem [Thu, 29 Nov 2012 19:28:29 +0000 (19:28 +0000)]
No need to run LICM after loop vectorization because we dont generate invariant code any more.
llvm-svn: 168928
Nadav Rotem [Thu, 29 Nov 2012 19:25:41 +0000 (19:25 +0000)]
When broadcasting invariant scalars into vectors, place the broadcast code in the preheader.
llvm-svn: 168927
Dmitri Gribenko [Thu, 29 Nov 2012 19:21:02 +0000 (19:21 +0000)]
Documentation for FileCheck: use 'option' and 'program' directives.
This enables option cross-referencing and now '--' in option names are no more turned into en dashes.
llvm-svn: 168926
Meador Inge [Thu, 29 Nov 2012 19:15:17 +0000 (19:15 +0000)]
instcombine: Migrate puts optimizations
This patch migrates the puts optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.
All the simplifiers from simplify-libcalls have now been migrated to
instcombine. Yay! Just a few other bits to migrate (prototype attribute
inference and a few statistics) and simplify-libcalls can finally be put
to rest.
llvm-svn: 168925
Dmitri Gribenko [Thu, 29 Nov 2012 19:14:35 +0000 (19:14 +0000)]
Documentation for llvm-link: reformat
llvm-svn: 168924
Jim Grosbach [Thu, 29 Nov 2012 19:14:11 +0000 (19:14 +0000)]
Fix a memory leak in MachOObjectFile.
MachOObjectFile owns a MachOObj, but never frees it. Both MachOObjectFile
and MachOObj want to own the MemoryBuffer, though, so we have to be careful
and give them each one of their own.
Thanks to Greg Clayton, Eric Christopher and Michael Spencer for helping
figure out what's going wrong here.
rdar://
12561773
llvm-svn: 168923
Dmitri Gribenko [Thu, 29 Nov 2012 19:10:21 +0000 (19:10 +0000)]
Documentation for llvm-cov: reformat
llvm-svn: 168922
Benjamin Kramer [Thu, 29 Nov 2012 19:07:57 +0000 (19:07 +0000)]
Follow up to 168711: It's safe to base this analysis on the found compare, just return the value for the right predicate.
Thanks to Andy for catching this.
llvm-svn: 168921
Dmitri Gribenko [Thu, 29 Nov 2012 19:05:55 +0000 (19:05 +0000)]
Documentation for llvm-stress: reformat
llvm-svn: 168920