Benjamin Kramer [Tue, 1 Jan 2013 16:13:35 +0000 (16:13 +0000)]
SROA: Clean up unused assignment warnings from clang's analyzer.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171348
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Tue, 1 Jan 2013 16:05:54 +0000 (16:05 +0000)]
Added DEBUG message when ObjCARC replaces a call which returns its argument verbatim with its argument to temporarily undo an optimization.
Specifically these calls return their argument verbatim, as a low-level
optimization. However, this makes high-level optimizations
harder. We undo any uses of this optimization that the front-end
emitted. We redo them later in the contract pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171346
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Tue, 1 Jan 2013 16:05:48 +0000 (16:05 +0000)]
Added DEBUG messages to the top of several processing loops in ObjCARC.cpp that emit what instructions are being visited.
This is a part of a larger effort of adding DEBUG messages to the ARC
Optimizer Backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171345
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Tue, 1 Jan 2013 14:04:36 +0000 (14:04 +0000)]
Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID
This is done to avoid odd test failures, like the one fixed in r171243.
While there, FileCheck'ize tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171344
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Tue, 1 Jan 2013 13:57:25 +0000 (13:57 +0000)]
Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID
This is done to avoid odd test failures, like the one fixed in r171243.
My previous regex was not good enough to find these.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171343
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 1 Jan 2013 10:00:19 +0000 (10:00 +0000)]
Update the copyright coredits -- Happy new year 2013!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171342
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Tue, 1 Jan 2013 08:00:32 +0000 (08:00 +0000)]
Make opt grab the triple from the module and use it to initialize the target machine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171341
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 1 Jan 2013 03:42:44 +0000 (03:42 +0000)]
Remove unused argument from a multiclass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171340
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 1 Jan 2013 03:30:21 +0000 (03:30 +0000)]
Merge intrinsic instruction definitions for SSE and AVX versions of RCPPS and RSQRTPS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171339
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 1 Jan 2013 02:02:45 +0000 (02:02 +0000)]
Remove 2 unused multiclasses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171338
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 1 Jan 2013 00:11:07 +0000 (00:11 +0000)]
Merge AVX/SSE instruction definitions for SQRTPS/PD, RSQRTPS, RCPPS. No funcitonal change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171337
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 31 Dec 2012 23:49:05 +0000 (23:49 +0000)]
Use packed instead of scalar itineraries for SSE1/2 SQRTPS/PD, RCPPS, and RSQRTPS. VEX-encoded forms already use packed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171336
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 31 Dec 2012 23:44:49 +0000 (23:44 +0000)]
Make it explicit that the only entry points to the Program object are
through the static helper functions. This is already true throughout the
codebase.
Slowly, I'm going to re-implement these static helpers in terms of a new
process based interface which can expose more information, and remove
the program object entirely.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171335
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 31 Dec 2012 23:44:47 +0000 (23:44 +0000)]
Remove an unused method on Program.
I'm simplifying this interface as much as I can before merging it with
the new process interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171334
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 31 Dec 2012 23:38:28 +0000 (23:38 +0000)]
Remove an unused method on the Program class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171332
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 31 Dec 2012 23:31:56 +0000 (23:31 +0000)]
Go ahead and get rid of the old page size interface and convert all the
users over to the new one. No sense maintaining this "compatibility"
layer it seems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171331
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 31 Dec 2012 23:23:35 +0000 (23:23 +0000)]
Flesh out a page size accessor in the new API.
Implement the old API in terms of the new one. This simplifies the
implementation on Windows which can now re-use the self_process's once
initialization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171330
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 31 Dec 2012 22:18:01 +0000 (22:18 +0000)]
Remove the declspecs from small alignments that we can force with
a union. These don't actually work for by-value function arguments, and
MSVC warns if they exist even while (we hope) it aligns the argument
correctly due to the other union member.
This means MSVC will miss out on optimizations based on the alignment of
the buffer, but really, there aren't that many for x86 and MSVC is
likely not doing a great job of optimizing LLVM and Clang anyways.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171328
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 31 Dec 2012 22:17:59 +0000 (22:17 +0000)]
Remove an unused function in the old Process interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171327
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Mon, 31 Dec 2012 20:48:35 +0000 (20:48 +0000)]
reimplement GetPointerBaseWithConstantOffset().
The new code is an improved copy of the code I deleted from Analysis/Loads.cpp.
One less compute-constant-gep-offset implementation. yay :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171326
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Mon, 31 Dec 2012 20:45:10 +0000 (20:45 +0000)]
recommit r171298 (add support for PHI nodes to ObjectSizeOffsetVisitor). Hopefully with bugs corrected now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171325
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Mon, 31 Dec 2012 19:54:45 +0000 (19:54 +0000)]
[AlignOf] Add AlignedCharArray and refactor AlignedCharArrayUnion.
This adds AlignedCharArray<Alignment, Size>. A templated struct that contains
a member named buffer of type char[Size] that is aligned to Alignment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171319
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 31 Dec 2012 19:51:10 +0000 (19:51 +0000)]
Revert "add support for PHI nodes to ObjectSizeOffsetVisitor"
This reverts r171298. Breaks clang selfhost.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171318
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Mon, 31 Dec 2012 18:26:42 +0000 (18:26 +0000)]
Add extra CHECK to make sure that 'or' instruction was replaced.
Also add an assert to avoid confusion in the code where is known that C1 <= C2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171310
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 31 Dec 2012 18:20:51 +0000 (18:20 +0000)]
Fix bits check in ELFObjectFile::isSectionZeroInit().
Fixes PR14723.
Patch by Sami Liedes!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171309
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Mon, 31 Dec 2012 18:01:36 +0000 (18:01 +0000)]
revert r171306, since we cannot compare APInts with different bitwidths
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171308
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Mon, 31 Dec 2012 17:42:11 +0000 (17:42 +0000)]
use ValueTracking's GetPointerBaseWithConstantOffset() function instead of a local implementation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171307
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Mon, 31 Dec 2012 17:25:24 +0000 (17:25 +0000)]
minor code simplification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171306
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 31 Dec 2012 16:53:01 +0000 (16:53 +0000)]
Use the generic dump template. Extracted from a patch by Sami Liedes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171305
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 31 Dec 2012 16:29:44 +0000 (16:29 +0000)]
Dump sections. Extracted from a patch by Sami Liedes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171304
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Mon, 31 Dec 2012 16:23:48 +0000 (16:23 +0000)]
add support for GlobalAlias to ObjectSizeOffsetVisitor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171303
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 31 Dec 2012 16:05:21 +0000 (16:05 +0000)]
Print a header above the symbols. Extracted from a patch by Sami Liedes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171302
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 31 Dec 2012 15:45:31 +0000 (15:45 +0000)]
Check for errors. Extracted from a patch by Sami Liedes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171301
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 31 Dec 2012 15:30:58 +0000 (15:30 +0000)]
Fix indentation. Extracted from a patch by Sami Liedes!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171300
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 31 Dec 2012 15:27:42 +0000 (15:27 +0000)]
Style fixes in llvm-readobj.cpp. Extracted from a patch by Sami Liedes!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171299
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Mon, 31 Dec 2012 13:52:36 +0000 (13:52 +0000)]
add support for PHI nodes to ObjectSizeOffsetVisitor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171298
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 31 Dec 2012 11:52:55 +0000 (11:52 +0000)]
Remove dead method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171295
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 31 Dec 2012 11:51:54 +0000 (11:51 +0000)]
Add some comparison operators to compare the Attribute object with the AttrKind value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171294
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Mon, 31 Dec 2012 11:49:51 +0000 (11:49 +0000)]
docs: Fix FIXME
I actually made a think-o when writing this FIXME since I wrote LangRef
but it should actually have said WritingAnLLVMBackend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171293
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 31 Dec 2012 11:45:20 +0000 (11:45 +0000)]
Switch this code to a more idiomatic double using namespace directive.
Fix a truly odd namespace qualifier that was flat out wrong in the
process. The fully qualified namespace would have been
llvm::sys::TimeValue, llvm::TimeValue makes no sense.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171292
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 31 Dec 2012 11:40:04 +0000 (11:40 +0000)]
Delete a cut/paste-o from r171290. Very sorry about the noise.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171291
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 31 Dec 2012 11:39:02 +0000 (11:39 +0000)]
Suppress a MSVC warning complaining about the code working as intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171290
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 31 Dec 2012 11:17:50 +0000 (11:17 +0000)]
Begin sketching out the process interface.
The coding style used here is not LLVM's style because this is modeled
after a Boost interface and thus done in the style of a candidate C++
standard library interface. I'll probably end up proposing it as
a standard C++ library if it proves to be reasonably portable and
useful.
This is just the most basic parts of the interface -- getting the
process ID out of it. However, it helps sketch out some of the boiler
plate such as the base class, derived class, shared code, and static
factory function. It also introduces a unittest so that I can
incrementally ensure this stuff works.
However, I've not even compiled this code for Windows yet. I'll try to
fix any Windows fallout from the bots, and if I can't fix it I'll revert
and get someone on Windows to help out. There isn't a lot more that is
mandatory, so soon I'll switch to just stubbing out the Windows side and
get Michael Spencer to help with implementation as he can test it
directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171289
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 31 Dec 2012 09:29:16 +0000 (09:29 +0000)]
Start sketching out a roadmap for better subprocess management in the
LLVM libraries. Also, clean up the doxygen and formatting of the
existing interfaces.
With this change I'm calling the existing interface "legacy" because I'd
like to replace it with something much better. My end goal is to expose
a common set of interfaces for inspecting various properties of
a process, and implementations to expose those both for the current
process and for child processes. This will also expose more rich
interfaces for spawning and controling a subprocess, notably to use
system calls like wait3 and wait4 where available and gather detailed
resource usage stats about the subprocess.
My plan (discussed with Michael Spencer on IRC) is to base this loosely
around the proposed Boost.Process interface, but to implement
a relatively small subset of that functionality based around the needs
of LLVM, Clang, the Clang driver, etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171285
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 31 Dec 2012 08:37:17 +0000 (08:37 +0000)]
Fix LICM's memory promotion optimization to preserve TBAA tags when
promoting a store in a loop. This was noticed when working on PR14753,
but isn't directly related.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171281
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 31 Dec 2012 08:10:58 +0000 (08:10 +0000)]
teach instcombine to preserve TBAA tag when merging two stores, part of
PR14753
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171279
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Mon, 31 Dec 2012 01:40:44 +0000 (01:40 +0000)]
Grammo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171272
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 31 Dec 2012 00:49:59 +0000 (00:49 +0000)]
Remove the getAttributesAtIndex and getNumAttrs methods in favor of using the getAttrSomewhere predicate. This prevents the uses of 'Attribute' as a collection of attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171271
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Mon, 31 Dec 2012 00:34:55 +0000 (00:34 +0000)]
Transform (A == C1 || A == C2) into (A & ~(C1 ^ C2)) == C1
if C1 and C2 differ only with one bit.
Fixes PR14708.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171270
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Sun, 30 Dec 2012 19:03:32 +0000 (19:03 +0000)]
Support ppcf128 in SelectionDAG::getConstantFP
Fixes pr14751.
Patch by Kai; Thanks!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171261
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Sun, 30 Dec 2012 16:25:48 +0000 (16:25 +0000)]
convert a bunch of callers from DataLayout::getIndexedOffset() to GEP::accumulateConstantOffset().
The later API is nicer than the former, and is correct regarding wrap-around offsets (if anyone cares).
There are a few more places left with duplicated code, which I'll remove soon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171259
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Sun, 30 Dec 2012 14:51:03 +0000 (14:51 +0000)]
Documentation: add a section to prevent spurious test failures like the one
fixed in r171243.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171258
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 30 Dec 2012 13:50:49 +0000 (13:50 +0000)]
Use the predicate methods off of AttributeSet instead of Attribute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171257
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 30 Dec 2012 13:01:51 +0000 (13:01 +0000)]
Remove the Function::getRetAttributes method in favor of using the AttributeSet accessor method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171256
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 30 Dec 2012 12:45:13 +0000 (12:45 +0000)]
Remove Function::getParamAttributes and use the AttributeSet accessor methods instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171255
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 30 Dec 2012 10:32:01 +0000 (10:32 +0000)]
Remove the Function::getFnAttributes method in favor of using the AttributeSet
directly.
This is in preparation for removing the use of the 'Attribute' class as a
collection of attributes. That will shift to the AttributeSet class instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171253
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 30 Dec 2012 09:17:46 +0000 (09:17 +0000)]
s/hasAttribute/contains/g to be more consistent with other method names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171252
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Sun, 30 Dec 2012 07:47:00 +0000 (07:47 +0000)]
LoopVectorizer: Fix a bug in the code that updates the loop exiting block.
LCSSA PHIs may have undef values. The vectorizer updates values that are used by outside users such as PHIs.
The bug happened because undefs are not loop values. This patch handles these PHIs.
PR14725
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171251
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Sun, 30 Dec 2012 02:33:22 +0000 (02:33 +0000)]
Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID
This is done to avoid odd test failures, like the one fixed in r171243.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171250
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 30 Dec 2012 02:22:16 +0000 (02:22 +0000)]
Add a few more c'tors:
* One that accepts a single Attribute::AttrKind.
* One that accepts an Attribute::AttrKind plus a list of values. This is for
attributes defined like this:
#1 = attributes { align = 4 }
* One that accepts a string, for target-specific attributes like this:
#2 = attributes { "cpu=cortex-a8" }
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171249
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Sun, 30 Dec 2012 01:42:34 +0000 (01:42 +0000)]
Add a check to the test Analysis/ScalarEvolution/2010-09-03-RequiredTransitive.ll
This test did not test anything at all (except for opt crashing, but that was
not the reason why it was added).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171248
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 30 Dec 2012 01:38:39 +0000 (01:38 +0000)]
Add a few (as yet unused) query methods to determine if the attribute that's
stored here is of a certain kind. This is in preparation for when an Attribute
object represents a single attribute, instead of a bitmask of attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171247
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Sun, 30 Dec 2012 01:28:40 +0000 (01:28 +0000)]
Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID
This is done to avoid odd test failures, like the one fixed in r171243.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171246
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 30 Dec 2012 01:23:08 +0000 (01:23 +0000)]
Uniquify the AttributeImpl based on the Constant pointer, since those are
already uniquified.
Note: This will be expanded in the future to add more than just one pointer
value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171245
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 30 Dec 2012 01:05:42 +0000 (01:05 +0000)]
s/Raw/getBitMask/g to be more in line with current naming conventions. This method won't be sticking around.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171244
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 30 Dec 2012 00:33:26 +0000 (00:33 +0000)]
llvm/test/Transforms/GVN/null-aliases-nothing.ll: Fix a RUN line not to emit ModuleID.
Larry Evans reported it fails if source tree contains "load", like "download".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171243
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 29 Dec 2012 18:18:20 +0000 (18:18 +0000)]
Remove intrinsic specific instructions for (V)SQRTPS/PD. Instead lower to target-independent ISD nodes and use the existing patterns for those.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171237
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 29 Dec 2012 17:19:06 +0000 (17:19 +0000)]
Merge similar functionality using a nested switch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171229
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 29 Dec 2012 16:44:25 +0000 (16:44 +0000)]
Remove intrinsic specific instructions for SSE/SSE2/AVX floating point max/min instructions. Lower them to target specific nodes and use those patterns instead. This also allows them to be commuted if UnsafeFPMath is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171227
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Sat, 29 Dec 2012 15:57:26 +0000 (15:57 +0000)]
Simplify code, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171226
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Sat, 29 Dec 2012 15:23:06 +0000 (15:23 +0000)]
Delete executive bit on ./lib/Target/Hexagon/HexagonAsmPrinter.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171225
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 29 Dec 2012 12:29:38 +0000 (12:29 +0000)]
Use a 'Constant' object instead of a bit field to store the attribute data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171221
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 29 Dec 2012 12:10:46 +0000 (12:10 +0000)]
Use the accessor method instead of the raw ivar to get the bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171220
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 28 Dec 2012 14:50:51 +0000 (14:50 +0000)]
Nuke some dead code that snuck in some how. I thought I had already
deleted this, but apparantly not. Charmingly, Clang didn't warn on it
but GCC did.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171197
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 28 Dec 2012 14:43:42 +0000 (14:43 +0000)]
Fix a stunning oversight in the inline cost analysis. It was never
propagating one of the values it simplified to a constant across
a myriad of instructions. Notably, ptrtoint instructions when we had
a constant pointer (say, 0) didn't propagate that, blocking a massive
number of down-stream optimizations.
This was uncovered when investigating why we fail to inline and delete
the boilerplate in:
void f() {
std::vector<int> v;
v.push_back(1);
}
It turns out most of the efforts I've made thus far to improve the
analysis weren't making it far purely because of this. After this is
fixed, the store-to-load forwarding patch enables LLVM to optimize the
above to an empty function. We still can't nuke a second push_back, but
for different reasons.
There is a very real chance this will cause somewhat noticable changes
in inlining behavior, so please let me know if you see regressions (or
improvements!) because of this patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171196
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 28 Dec 2012 14:23:32 +0000 (14:23 +0000)]
Teach the inline cost analysis about calls that can be simplified and
how to propagate constants through insert and extract value
instructions.
With the recent improvements to instsimplify, this allows inline cost
analysis to constant fold through intrinsic functions, including notably
the with.overflow intrinsic math routines which often show up inside of
STL abstractions. This is yet another piece in the puzzle of breaking
down the code for:
void f() {
std::vector<int> v;
v.push_back(1);
}
But it still isn't enough. There are a pile of bugs in inline cost still
blocking this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171195
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 28 Dec 2012 14:23:29 +0000 (14:23 +0000)]
Teach instsimplify to use the constant folder where appropriate for
constant folding calls. Add the initial tests for this which show that
now instsimplify can simplify blindingly obvious code patterns expressed
with both intrinsics and library calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171194
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 28 Dec 2012 11:30:55 +0000 (11:30 +0000)]
Add entry points to instsimplify for simplifying calls. The entry points
are nice and decomposed so that we can simplify synthesized calls as
easily as actually call instructions. The internal utility still has the
same behavior, it just now operates on a more generic interface so that
I can extend the set of call simplifications that instsimplify knows
about.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171189
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Fri, 28 Dec 2012 09:30:44 +0000 (09:30 +0000)]
Add proper support for -fsanitize-blacklist= flag for TSan and MSan. LLVM part.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171183
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 28 Dec 2012 08:19:03 +0000 (08:19 +0000)]
CostModel: initial checkin for code that estimates the cost of special shuffles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171180
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 28 Dec 2012 07:28:43 +0000 (07:28 +0000)]
wrap 80-col lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171179
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 28 Dec 2012 05:45:24 +0000 (05:45 +0000)]
AVX: Move the ZEXT/ANYEXT DAGCo optimizations to the lowering of these optimizations. The old test cases still cover all of these lowering/optimizations. The single change that we have is that now anyext does not need to zero a register, because it does not use the exact code path as the zero_extend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171178
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 27 Dec 2012 23:08:05 +0000 (23:08 +0000)]
Reverse the 'if' condition and reduce the indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171172
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 27 Dec 2012 22:53:47 +0000 (22:53 +0000)]
Merge basic_sse12_fp_binop_p_int and basic_sse12_fp_binop_p_y_int multiclasses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171171
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 27 Dec 2012 22:47:16 +0000 (22:47 +0000)]
AVX/AVX2: Move the SEXT lowering code from a target specific DAGco to a lowering function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171170
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 27 Dec 2012 18:51:50 +0000 (18:51 +0000)]
Merge basic_sse12_fp_binop_p and basic_sse12_fp_binop_p_y multiclasses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171166
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 27 Dec 2012 12:00:56 +0000 (12:00 +0000)]
Add support to BasicBlocks for iterating backwards over the
instructions. This just exposes the already present reverse iterators of
the instruction ilist.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171159
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 27 Dec 2012 11:29:17 +0000 (11:29 +0000)]
Provide a common half-open interval map info implementation, and just
re-use that for SlotIndexes. This way other users who want half-open
semantics can share the implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171158
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 27 Dec 2012 11:17:15 +0000 (11:17 +0000)]
Make this parameter be named consistently with most other
getAnalysisUsage implementations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171157
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Thu, 27 Dec 2012 10:23:04 +0000 (10:23 +0000)]
docs: Add FAQ about "storing to a virtual register".
This came up for the N+1'st time today in IRC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171155
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Thu, 27 Dec 2012 08:57:08 +0000 (08:57 +0000)]
docs: Move link to the new "external tutorials" area.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171154
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Thu, 27 Dec 2012 08:50:58 +0000 (08:50 +0000)]
[ASan] Fix lifetime intrinsics handling. Now for each intrinsic we check if it describes one of 'interesting' allocas. Assume that allocas can go through casts and phi-nodes before apperaring as llvm.lifetime arguments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171153
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 27 Dec 2012 08:44:35 +0000 (08:44 +0000)]
DAGCombinerInformation: add a getter that exposes the dagcombine level.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171152
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Thu, 27 Dec 2012 08:40:37 +0000 (08:40 +0000)]
Fix new[]/delete mismatch in FullDependence spotted by AddressSanitizer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171150
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 27 Dec 2012 08:32:44 +0000 (08:32 +0000)]
docs: Update the benchmark with updated perf numbers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171149
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 27 Dec 2012 08:15:45 +0000 (08:15 +0000)]
On AVX/AVX2 the type v8i1 is legalized to v8i16, which is an XMM sized
register. In most cases we actually compare or select YMM-sized registers
and mixing the two types creates horrible code. This commit optimizes
some of the transition sequences.
PR14657.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171148
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 27 Dec 2012 07:45:10 +0000 (07:45 +0000)]
AVX/AVX2: Move the code that lowers vector-trunc from a DAGCo-hook to custom lowering hook.
The vector truncs were scalarized during LegalizeVectorOps, later vectorized again by some DAGCombine optimization
and finally, lowered by a dagcombing optimization. Now, they are properly lowered during LegalizeVectorOps.
No new testcase because the original testcases still work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171146
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 27 Dec 2012 07:16:08 +0000 (07:16 +0000)]
Add hasSideEffects=0 to some forms of ROUND, RCP, and RSQRT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171143
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 27 Dec 2012 06:47:41 +0000 (06:47 +0000)]
Refactor DAGCombinerInfo. Change the different booleans that indicate if we are before or after different runs of DAGCo, with the CombineLevel enum.
Also, added a new API for checking if we are running before or after the LegalizeVectorOps phase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171142
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 27 Dec 2012 06:34:54 +0000 (06:34 +0000)]
Move single letter 'P' prefix out of multiclass now that tablegen allows defm to start with #NAME. This makes instruction names more searchable again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171141
91177308-0d34-0410-b5e6-
96231b3b80d8