Commit Graph

88025 Commits

Author SHA1 Message Date
Chandler Carruth be81023d74 Resort the #include lines in include/... and lib/... with the
utils/sort_includes.py script.

Most of these are updating the new R600 target and fixing up a few
regressions that have creeped in since the last time I sorted the
includes.

llvm-svn: 171362
2013-01-02 10:22:59 +00:00
Chandler Carruth b676fd8b9d Update the root Makefile for VMCore -> IR. Missed by my original search
sadly, and is somewhat surprising in general.

llvm-svn: 171361
2013-01-02 09:27:25 +00:00
Chandler Carruth fbdae1f0f6 Update the configure scripts as well as the makefiles for the move from
VMCore to IR.

llvm-svn: 171360
2013-01-02 09:22:59 +00:00
Chandler Carruth ef860a2488 Rename VMCore directory to IR.
Aside from moving the actual files, this patch only updates the build
system and the source file comments under lib/... that are relevant.

I'll be updating other docs and other files in smaller subsequnet
commits.

While I've tried to test this, but it is entirely possible that there
will still be some build system fallout.

Also, note that I've not changed the library name itself: libLLVMCore.a
is still the library name. I'd be interested in others' opinions about
whether we should rename this as well (I think we should, just not sure
what it might break)

llvm-svn: 171359
2013-01-02 09:10:48 +00:00
Craig Topper 9791afb182 Merge SSE and AVX instruction definitions for scalar forms of SQRT, RSQRT, and RCP.
llvm-svn: 171356
2013-01-02 08:00:39 +00:00
Craig Topper 4bc5c4e152 Merge SSE and AVX instruction definitions for PSHUFD/PSHUFHW/PSHUFLW.
llvm-svn: 171355
2013-01-02 07:27:49 +00:00
Sean Silva e3c5e48fc4 docs: update docs/README.txt and make it useful.
llvm-svn: 171353
2013-01-02 02:31:51 +00:00
Rafael Espindola db1a84c84a Revert 171351. It broke MC/X86/x86-32-avx.s.
llvm-svn: 171352
2013-01-02 01:35:11 +00:00
Craig Topper 86d0cdb82f Merge SSE and AVX instruction definitions for scalar forms of SQRT, RSQRT, and RCP.
llvm-svn: 171351
2013-01-01 20:53:20 +00:00
Benjamin Kramer 614b5e85b9 Add IRBuilder::CreateVectorSplat and use it to simplify code.
llvm-svn: 171349
2013-01-01 19:55:16 +00:00
Benjamin Kramer c003a4521b SROA: Clean up unused assignment warnings from clang's analyzer.
No functionality change.

llvm-svn: 171348
2013-01-01 16:13:35 +00:00
Michael Gottesman c8a11df33b 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.

llvm-svn: 171346
2013-01-01 16:05:54 +00:00
Michael Gottesman 3f146e204e 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.

llvm-svn: 171345
2013-01-01 16:05:48 +00:00
Dmitri Gribenko 86fb558d9a 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.

llvm-svn: 171344
2013-01-01 14:04:36 +00:00
Dmitri Gribenko d7beca87f5 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.

llvm-svn: 171343
2013-01-01 13:57:25 +00:00
NAKAMURA Takumi 43632a26a5 Update the copyright coredits -- Happy new year 2013!
llvm-svn: 171342
2013-01-01 10:00:19 +00:00
Nadav Rotem b1615b1ac4 Make opt grab the triple from the module and use it to initialize the target machine.
llvm-svn: 171341
2013-01-01 08:00:32 +00:00
Craig Topper 12ed9cd6ae Remove unused argument from a multiclass.
llvm-svn: 171340
2013-01-01 03:42:44 +00:00
Craig Topper 2edafc059d Merge intrinsic instruction definitions for SSE and AVX versions of RCPPS and RSQRTPS.
llvm-svn: 171339
2013-01-01 03:30:21 +00:00
Craig Topper d04dbec6c9 Remove 2 unused multiclasses.
llvm-svn: 171338
2013-01-01 02:02:45 +00:00
Craig Topper 7cc4f322cf Merge AVX/SSE instruction definitions for SQRTPS/PD, RSQRTPS, RCPPS. No funcitonal change intended.
llvm-svn: 171337
2013-01-01 00:11:07 +00:00
Craig Topper c2521cd309 Use packed instead of scalar itineraries for SSE1/2 SQRTPS/PD, RCPPS, and RSQRTPS. VEX-encoded forms already use packed.
llvm-svn: 171336
2012-12-31 23:49:05 +00:00
Chandler Carruth 2da2cab63a 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.

llvm-svn: 171335
2012-12-31 23:44:49 +00:00
Chandler Carruth 76fbeef95a Remove an unused method on Program.
I'm simplifying this interface as much as I can before merging it with
the new process interface.

llvm-svn: 171334
2012-12-31 23:44:47 +00:00
Chandler Carruth db8842f9f3 Remove an unused method on the Program class.
llvm-svn: 171332
2012-12-31 23:38:28 +00:00
Chandler Carruth acd64becb1 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.

llvm-svn: 171331
2012-12-31 23:31:56 +00:00
Chandler Carruth 15dcad9e36 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.

llvm-svn: 171330
2012-12-31 23:23:35 +00:00
Chandler Carruth 3fa2010c7d 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.

llvm-svn: 171328
2012-12-31 22:18:01 +00:00
Chandler Carruth b12634bf80 Remove an unused function in the old Process interface.
llvm-svn: 171327
2012-12-31 22:17:59 +00:00
Nuno Lopes 368c4d0e1b 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 :)

llvm-svn: 171326
2012-12-31 20:48:35 +00:00
Nuno Lopes d896a400f1 recommit r171298 (add support for PHI nodes to ObjectSizeOffsetVisitor). Hopefully with bugs corrected now.
llvm-svn: 171325
2012-12-31 20:45:10 +00:00
Michael J. Spencer da3e31a419 [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.

llvm-svn: 171319
2012-12-31 19:54:45 +00:00
Benjamin Kramer af463573cb Revert "add support for PHI nodes to ObjectSizeOffsetVisitor"
This reverts r171298. Breaks clang selfhost.

llvm-svn: 171318
2012-12-31 19:51:10 +00:00
Jakub Staszak c48bbe7170 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.

llvm-svn: 171310
2012-12-31 18:26:42 +00:00
Rafael Espindola c8288c103d Fix bits check in ELFObjectFile::isSectionZeroInit().
Fixes PR14723.

Patch by Sami Liedes!

llvm-svn: 171309
2012-12-31 18:20:51 +00:00
Nuno Lopes 4b47f82ac2 revert r171306, since we cannot compare APInts with different bitwidths
llvm-svn: 171308
2012-12-31 18:01:36 +00:00
Nuno Lopes 69dcc7deec use ValueTracking's GetPointerBaseWithConstantOffset() function instead of a local implementation
llvm-svn: 171307
2012-12-31 17:42:11 +00:00
Nuno Lopes 556b7de2c0 minor code simplification
llvm-svn: 171306
2012-12-31 17:25:24 +00:00
Rafael Espindola 278e891cb2 Use the generic dump template. Extracted from a patch by Sami Liedes.
llvm-svn: 171305
2012-12-31 16:53:01 +00:00
Rafael Espindola 21bd841d27 Dump sections. Extracted from a patch by Sami Liedes.
llvm-svn: 171304
2012-12-31 16:29:44 +00:00
Nuno Lopes e9d6dbf7a2 add support for GlobalAlias to ObjectSizeOffsetVisitor
llvm-svn: 171303
2012-12-31 16:23:48 +00:00
Rafael Espindola 144af2cb4d Print a header above the symbols. Extracted from a patch by Sami Liedes.
llvm-svn: 171302
2012-12-31 16:05:21 +00:00
Rafael Espindola 63d52b1e1c Check for errors. Extracted from a patch by Sami Liedes.
llvm-svn: 171301
2012-12-31 15:45:31 +00:00
Rafael Espindola ae74095255 Fix indentation. Extracted from a patch by Sami Liedes!
llvm-svn: 171300
2012-12-31 15:30:58 +00:00
Rafael Espindola f4b73f9733 Style fixes in llvm-readobj.cpp. Extracted from a patch by Sami Liedes!
llvm-svn: 171299
2012-12-31 15:27:42 +00:00
Nuno Lopes 7ab7c02d23 add support for PHI nodes to ObjectSizeOffsetVisitor
llvm-svn: 171298
2012-12-31 13:52:36 +00:00
Bill Wendling f50ea7109d Remove dead method.
llvm-svn: 171295
2012-12-31 11:52:55 +00:00
Bill Wendling e10f76c640 Add some comparison operators to compare the Attribute object with the AttrKind value.
llvm-svn: 171294
2012-12-31 11:51:54 +00:00
Sean Silva 6e4ebb5424 docs: Fix FIXME
I actually made a think-o when writing this FIXME since I wrote LangRef
but it should actually have said WritingAnLLVMBackend.

llvm-svn: 171293
2012-12-31 11:49:51 +00:00
Chandler Carruth 5473dfb099 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.

llvm-svn: 171292
2012-12-31 11:45:20 +00:00
Chandler Carruth 304de3c424 Delete a cut/paste-o from r171290. Very sorry about the noise.
llvm-svn: 171291
2012-12-31 11:40:04 +00:00
Chandler Carruth 5412246d8b Suppress a MSVC warning complaining about the code working as intended.
llvm-svn: 171290
2012-12-31 11:39:02 +00:00
Chandler Carruth 97683aa2fa 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.

llvm-svn: 171289
2012-12-31 11:17:50 +00:00
Chandler Carruth c457907708 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.

llvm-svn: 171285
2012-12-31 09:29:16 +00:00
Chris Lattner f5cca68c2c 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.

llvm-svn: 171281
2012-12-31 08:37:17 +00:00
Chris Lattner eeefe1bc07 teach instcombine to preserve TBAA tag when merging two stores, part of
PR14753

llvm-svn: 171279
2012-12-31 08:10:58 +00:00
Jakub Staszak f584977df2 Grammo.
llvm-svn: 171272
2012-12-31 01:40:44 +00:00
Bill Wendling 6e95ae803a Remove the getAttributesAtIndex and getNumAttrs methods in favor of using the getAttrSomewhere predicate. This prevents the uses of 'Attribute' as a collection of attributes.
llvm-svn: 171271
2012-12-31 00:49:59 +00:00
Jakub Staszak ea2b9b9d67 Transform (A == C1 || A == C2) into (A & ~(C1 ^ C2)) == C1
if C1 and C2 differ only with one bit.
Fixes PR14708.

llvm-svn: 171270
2012-12-31 00:34:55 +00:00
Hal Finkel 6dbdd4307b Support ppcf128 in SelectionDAG::getConstantFP
Fixes pr14751.

Patch by Kai; Thanks!

llvm-svn: 171261
2012-12-30 19:03:32 +00:00
Nuno Lopes b6ad98224a 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.

llvm-svn: 171259
2012-12-30 16:25:48 +00:00
Dmitri Gribenko 12be928dfb Documentation: add a section to prevent spurious test failures like the one
fixed in r171243.

llvm-svn: 171258
2012-12-30 14:51:03 +00:00
Bill Wendling 749a43d874 Use the predicate methods off of AttributeSet instead of Attribute.
llvm-svn: 171257
2012-12-30 13:50:49 +00:00
Bill Wendling 74dba875e2 Remove the Function::getRetAttributes method in favor of using the AttributeSet accessor method.
llvm-svn: 171256
2012-12-30 13:01:51 +00:00
Bill Wendling 94dcaf8e2b Remove Function::getParamAttributes and use the AttributeSet accessor methods instead.
llvm-svn: 171255
2012-12-30 12:45:13 +00:00
Bill Wendling 698e84fc4f 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.

llvm-svn: 171253
2012-12-30 10:32:01 +00:00
Bill Wendling 6190254e0f s/hasAttribute/contains/g to be more consistent with other method names.
llvm-svn: 171252
2012-12-30 09:17:46 +00:00
Nadav Rotem 0b37f14371 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

llvm-svn: 171251
2012-12-30 07:47:00 +00:00
Dmitri Gribenko 56bf2e1830 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.

llvm-svn: 171250
2012-12-30 02:33:22 +00:00
Bill Wendling 3a554ac065 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" }

llvm-svn: 171249
2012-12-30 02:22:16 +00:00
Dmitri Gribenko 10c4b4d249 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).

llvm-svn: 171248
2012-12-30 01:42:34 +00:00
Bill Wendling b1d12619c9 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.

llvm-svn: 171247
2012-12-30 01:38:39 +00:00
Dmitri Gribenko b137c9e551 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.

llvm-svn: 171246
2012-12-30 01:28:40 +00:00
Bill Wendling 5e8ff877f4 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.

llvm-svn: 171245
2012-12-30 01:23:08 +00:00
Bill Wendling 3e4c4c9607 s/Raw/getBitMask/g to be more in line with current naming conventions. This method won't be sticking around.
llvm-svn: 171244
2012-12-30 01:05:42 +00:00
NAKAMURA Takumi 5a495a5c96 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".

llvm-svn: 171243
2012-12-30 00:33:26 +00:00
Craig Topper fe82eb6bcd Remove intrinsic specific instructions for (V)SQRTPS/PD. Instead lower to target-independent ISD nodes and use the existing patterns for those.
llvm-svn: 171237
2012-12-29 18:18:20 +00:00
Craig Topper f4a9c6e21b Merge similar functionality using a nested switch.
llvm-svn: 171229
2012-12-29 17:19:06 +00:00
Craig Topper 6b27251a76 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.
llvm-svn: 171227
2012-12-29 16:44:25 +00:00
Jakub Staszak 215f94143c Simplify code, no functionality change.
llvm-svn: 171226
2012-12-29 15:57:26 +00:00
Jakub Staszak afe8109fce Delete executive bit on ./lib/Target/Hexagon/HexagonAsmPrinter.h.
llvm-svn: 171225
2012-12-29 15:23:06 +00:00
Bill Wendling 0cd0f7f832 Use a 'Constant' object instead of a bit field to store the attribute data.
llvm-svn: 171221
2012-12-29 12:29:38 +00:00
Bill Wendling 4fdde84613 Use the accessor method instead of the raw ivar to get the bits.
llvm-svn: 171220
2012-12-29 12:10:46 +00:00
Chandler Carruth 405d681340 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.

llvm-svn: 171197
2012-12-28 14:50:51 +00:00
Chandler Carruth 86ed53089f 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.

llvm-svn: 171196
2012-12-28 14:43:42 +00:00
Chandler Carruth 753e21d057 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.

llvm-svn: 171195
2012-12-28 14:23:32 +00:00
Chandler Carruth f6182155f6 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.

llvm-svn: 171194
2012-12-28 14:23:29 +00:00
Chandler Carruth 9dc3558920 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.

llvm-svn: 171189
2012-12-28 11:30:55 +00:00
Alexey Samsonov 3efc87e92d Add proper support for -fsanitize-blacklist= flag for TSan and MSan. LLVM part.
llvm-svn: 171183
2012-12-28 09:30:44 +00:00
Nadav Rotem 9785f519b4 CostModel: initial checkin for code that estimates the cost of special shuffles.
llvm-svn: 171180
2012-12-28 08:19:03 +00:00
Nadav Rotem c982a2dc25 wrap 80-col lines.
llvm-svn: 171179
2012-12-28 07:28:43 +00:00
Nadav Rotem 3da9ac72fa 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.
llvm-svn: 171178
2012-12-28 05:45:24 +00:00
Nadav Rotem 68441914a5 Reverse the 'if' condition and reduce the indentation.
llvm-svn: 171172
2012-12-27 23:08:05 +00:00
Craig Topper ab2e6842cc Merge basic_sse12_fp_binop_p_int and basic_sse12_fp_binop_p_y_int multiclasses.
llvm-svn: 171171
2012-12-27 22:53:47 +00:00
Nadav Rotem 3b34190100 AVX/AVX2: Move the SEXT lowering code from a target specific DAGco to a lowering function.
llvm-svn: 171170
2012-12-27 22:47:16 +00:00
Craig Topper e2eec3c52b Merge basic_sse12_fp_binop_p and basic_sse12_fp_binop_p_y multiclasses.
llvm-svn: 171166
2012-12-27 18:51:50 +00:00
Chandler Carruth 3edd52c1d0 Add support to BasicBlocks for iterating backwards over the
instructions. This just exposes the already present reverse iterators of
the instruction ilist.

llvm-svn: 171159
2012-12-27 12:00:56 +00:00
Chandler Carruth a3c0d67d5b 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.

llvm-svn: 171158
2012-12-27 11:29:17 +00:00
Chandler Carruth e40e60eed5 Make this parameter be named consistently with most other
getAnalysisUsage implementations.

llvm-svn: 171157
2012-12-27 11:17:15 +00:00
Sean Silva 0f2eabce10 docs: Add FAQ about "storing to a virtual register".
This came up for the N+1'st time today in IRC.

llvm-svn: 171155
2012-12-27 10:23:04 +00:00
Sean Silva 33fc6cff4b docs: Move link to the new "external tutorials" area.
llvm-svn: 171154
2012-12-27 08:57:08 +00:00
Alexey Samsonov 29dd7f2090 [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
llvm-svn: 171153
2012-12-27 08:50:58 +00:00
Nadav Rotem 9aa00f0363 DAGCombinerInformation: add a getter that exposes the dagcombine level.
llvm-svn: 171152
2012-12-27 08:44:35 +00:00
Alexey Samsonov 75ceb5b56b Fix new[]/delete mismatch in FullDependence spotted by AddressSanitizer
llvm-svn: 171150
2012-12-27 08:40:37 +00:00
Nadav Rotem f85d3ee072 docs: Update the benchmark with updated perf numbers.
llvm-svn: 171149
2012-12-27 08:32:44 +00:00
Nadav Rotem 2a054b4475 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.

llvm-svn: 171148
2012-12-27 08:15:45 +00:00
Nadav Rotem 8e5d80eba3 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.

llvm-svn: 171146
2012-12-27 07:45:10 +00:00
Craig Topper 757f3fc394 Add hasSideEffects=0 to some forms of ROUND, RCP, and RSQRT.
llvm-svn: 171143
2012-12-27 07:16:08 +00:00
Nadav Rotem b1dd52450e 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. 

llvm-svn: 171142
2012-12-27 06:47:41 +00:00
Craig Topper 09ce4b9efe Move single letter 'P' prefix out of multiclass now that tablegen allows defm to start with #NAME. This makes instruction names more searchable again.
llvm-svn: 171141
2012-12-27 06:34:54 +00:00
Craig Topper 8f0b73942e Update tablegen parser to allow defm names to start with #NAME.
llvm-svn: 171140
2012-12-27 06:32:52 +00:00
Craig Topper 396cb795bc Add hasSideEffects=0 to some shift and rotate instructions. None of which are currently used by code generation.
llvm-svn: 171137
2012-12-27 03:35:44 +00:00
Craig Topper c7910828e4 Mark the divide instructions as hasSideEffects=0.
llvm-svn: 171136
2012-12-27 03:01:18 +00:00
Eric Christopher 3bf29fda91 For the dwarf5 split debug info code split out the string section
per compile unit/skeleton compile unit. Update tests accordingly.

llvm-svn: 171133
2012-12-27 02:14:01 +00:00
Eric Christopher c8a88ee691 FileCheck-ize.
llvm-svn: 171132
2012-12-27 02:13:58 +00:00
Eric Christopher d6152aabbb FileCheck-ize.
llvm-svn: 171131
2012-12-27 02:13:55 +00:00
Craig Topper 5b807aaa38 Add hasSideEffects=0 to CMP*rr_REV.
llvm-svn: 171130
2012-12-27 02:08:46 +00:00
Nadav Rotem b3f6751df5 whitespace
llvm-svn: 171129
2012-12-27 02:04:12 +00:00
Craig Topper 89e8607755 Add mayLoad, mayStore, and hasSideEffects tags to BT/BTS/BTR/BTC instructions. Shouldn't change any functionality since they don't have patterns to select them.
llvm-svn: 171128
2012-12-27 02:01:33 +00:00
Eric Christopher 5a6acfa4c8 Right now all of the relocations are 32-bit dwarf, and the relocation
information doesn't return an addend for Rel relocations. Go ahead
and use this information to fix relocation handling inside dwarfdump
for 32-bit ELF REL.

llvm-svn: 171126
2012-12-27 01:07:07 +00:00
Nadav Rotem 5350cd314b If all of the write objects are identified then we can vectorize the loop even if the read objects are unidentified.
PR14719.

llvm-svn: 171124
2012-12-26 23:30:53 +00:00
Craig Topper c557343956 Fix operands and encoding form for ARPL instruction. Register form had and reversed. Memory form writes memory, but was marked as MRMSrcMem.
llvm-svn: 171123
2012-12-26 23:27:57 +00:00
Craig Topper d47a70de9f Add hasSideEffects=0 to some atomic instructions.
llvm-svn: 171122
2012-12-26 23:08:12 +00:00
Craig Topper af2372087b Mark the AL/AX/EAX forms of the basic arithmetic operations has never having side effects.
llvm-svn: 171121
2012-12-26 22:19:23 +00:00
Nick Lewycky fca2acb618 80 columns. No functionality change.
llvm-svn: 171120
2012-12-26 22:00:49 +00:00
Nick Lewycky 90053a1214 Remove mid-optimizer warning. This situation should be handled differently,
such as by a compiler warning, a check in clang -fsanitizer=undefined, being
optimized to unreachable, or a combination of the above. PR14722.

llvm-svn: 171119
2012-12-26 22:00:35 +00:00
Craig Topper 1b8c0750ee Mark all the _REV instructions as not having side effects. They aren't really emitted by the backend, but it reduces the number of instructions in the output files with unmodelled side effects to make auditing easier.
llvm-svn: 171118
2012-12-26 21:30:22 +00:00
Craig Topper 18f2675e9b Remove a special conditional setting of neverHasSideEffects if the instruction didn't have a pattern. This was leftover from when tablegen used to complain if things were already inferred from patterns.
llvm-svn: 171117
2012-12-26 21:04:30 +00:00
Nadav Rotem 0bbf81e311 Update the docs with the new workload that was added.
llvm-svn: 171115
2012-12-26 19:45:00 +00:00
Nadav Rotem 3f7c4f36ba LoopVectorizer: Optimize the vectorization of consecutive memory access when the iteration step is -1
llvm-svn: 171114
2012-12-26 19:08:17 +00:00
Eli Bendersky 8d5f8dc485 Fix comment typo
llvm-svn: 171113
2012-12-26 18:15:42 +00:00
Evgeniy Stepanov 5eb5bf8b46 [msan] Raise alignment of origin stores/loads when possible.
Origin alignment is as high as the alignment of the corresponding application
location, but never less than 4.

llvm-svn: 171110
2012-12-26 11:55:09 +00:00
Evgeniy Stepanov d8be0c510c [msan] Expand the file comment with track-origins info.
llvm-svn: 171109
2012-12-26 10:59:00 +00:00
Benjamin Kramer d14720dced Fix quoting in configure. Patch by Krzysztof Parzyszek!
llvm-svn: 171108
2012-12-26 10:48:49 +00:00
Craig Topper 24f316e4db Merge still more SSE/AVX instruction definitions.
llvm-svn: 171103
2012-12-26 07:54:43 +00:00
Craig Topper af629e2700 Merge more SSE/AVX instruction definitions.
llvm-svn: 171102
2012-12-26 07:20:35 +00:00
NAKAMURA Takumi bf99a426cb TableGen/FixedLenDecoderEmitter.cpp: Fix a potential mask overflow in fieldFromInstruction().
Reported by Yang Yongyong, thanks!

llvm-svn: 171101
2012-12-26 06:43:14 +00:00
Nadav Rotem a1d2436b5f revert an accidental commit.
llvm-svn: 171098
2012-12-26 06:16:03 +00:00
Craig Topper 65fe30450d Fix 80 column violation.
llvm-svn: 171097
2012-12-26 06:15:53 +00:00
Craig Topper f4d0fe8fcd Fix class name in comment.
llvm-svn: 171096
2012-12-26 06:15:09 +00:00
Craig Topper 59747c4dbd Merge SSE/AVX PCMPEQ/PCMPGT instruction definitions.
llvm-svn: 171095
2012-12-26 06:14:15 +00:00
Nadav Rotem 7375d35711 Doc: add fmuladd to the list of vectorizeable functions. Thanks hfinkel.
llvm-svn: 171094
2012-12-26 06:03:35 +00:00
Craig Topper 8a48677586 Remove 'v' from mnemonic to fix asm matching failures.
llvm-svn: 171093
2012-12-26 06:02:15 +00:00
Craig Topper b4ef0fa3a1 Use an additional multiclass to merge the 128/256-bit SSE/AVX instruction definitions for a bunch of SSE2 integer arithmetic instructions.
llvm-svn: 171092
2012-12-26 05:49:15 +00:00
Nadav Rotem 5267bb71b8 Reformat the docs.
llvm-svn: 171091
2012-12-26 04:59:20 +00:00
Nadav Rotem 0e1d662d56 white space
llvm-svn: 171090
2012-12-26 04:58:12 +00:00
Craig Topper a2594dd5f0 Use an additional multiclass to merge the 128/256-bit SSE/AVX instruction definitions for PAND/POR/PXOR/PANDN
llvm-svn: 171087
2012-12-26 04:36:03 +00:00
Craig Topper 97730a0d6a Merge an AVX/SSE 256-bit and 128-bit multiclass.
llvm-svn: 171086
2012-12-26 03:56:47 +00:00
Craig Topper 8b59746390 Mark VANDNPD/VANDNPDS as not commutable.
llvm-svn: 171085
2012-12-26 03:48:10 +00:00
NAKAMURA Takumi 40aa3285f4 llvm/test/CodeGen/X86: FileCheck-ize two tests in r171083.
llvm-svn: 171084
2012-12-26 03:19:30 +00:00