Craig Topper [Thu, 3 Jan 2013 06:40:20 +0000 (06:40 +0000)]
Mark DIV/IDIV instructions hasSideEffects=1 because they can trap when dividing by 0. This is needed to keep early if conversion from moving them across basic blocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171461
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 3 Jan 2013 05:02:41 +0000 (05:02 +0000)]
Better comment on VTTI::getShuffleCost
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171459
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 3 Jan 2013 03:30:22 +0000 (03:30 +0000)]
Compiler.h: Leave LLVM_BUILTIN_UNREACHABLE undefined if it is unavailable in host compiler.
Users of LLVM_BUILTIN_UNREACHABLE should be responsible in the case when LLVM_BUILTIN_UNREACHABLE is undefined.
Actually, (0, (p)) in LLVM_ASSUME_ALIGNED(p, a) caused thousands of warnings on g++-4.4. It was a motivation in this commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171455
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 3 Jan 2013 02:34:09 +0000 (02:34 +0000)]
Add a subtype parameter to VTTI::getShuffleCost
In order to cost subvector insertion and extraction, we need to know
the type of the subvector being extracted.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171453
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 3 Jan 2013 02:01:50 +0000 (02:01 +0000)]
Revert everything to r171366 to try to fix the build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171450
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 3 Jan 2013 01:56:33 +0000 (01:56 +0000)]
Reformat the rst text.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171449
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 3 Jan 2013 01:54:39 +0000 (01:54 +0000)]
Try again to revert the bad patch. The tree was reverted for some unknown reason
before the last time.
--- Reverse-merging r171442 into '.':
U include/llvm/IR/Attributes.h
U lib/IR/Attributes.cpp
U lib/IR/AttributeImpl.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171448
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 3 Jan 2013 01:50:51 +0000 (01:50 +0000)]
Add a default Index for VTTI::getShuffleCost
When Kind == (Broadcast or Reverse) then Index is not used; make it an optional parameter.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171447
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 3 Jan 2013 01:47:31 +0000 (01:47 +0000)]
LoopVectorizer: Test the unrolling flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171446
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 3 Jan 2013 01:47:02 +0000 (01:47 +0000)]
LoopVectorizer: Document the unrolling feature.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171445
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 3 Jan 2013 01:46:27 +0000 (01:46 +0000)]
Revert patch. Something snuck in there that shouldn't be.
--- Reverse-merging r171441 into '.':
U include/llvm/IR/Attributes.h
U lib/IR/Attributes.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171444
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 3 Jan 2013 01:43:05 +0000 (01:43 +0000)]
Remove the 'contains' methods in favor of the 'operator==' method.
The 'operator==' method is a bit clearer and much less verbose for somethings
that should have only one value. Remove from the AttrBuilder for consistency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171442
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 3 Jan 2013 01:42:06 +0000 (01:42 +0000)]
Revert r171427, "An intermediate step in the Attributes rewrite."
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171441
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Thu, 3 Jan 2013 01:24:32 +0000 (01:24 +0000)]
[Object] Temporarily disable these tests.
They are failing because archives create unaligned ELF files. The recent
Endian change added a __builtin_unreachable() when this happens. I will be
committing a fix for this soon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171438
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Thu, 3 Jan 2013 01:09:22 +0000 (01:09 +0000)]
[MC][COFF] Switch the COFF streamer over to using the MCObjectStreamer version of EmitInstruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171437
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 3 Jan 2013 00:52:27 +0000 (00:52 +0000)]
LoopVectorizer: Add support for loop-unrolling during vectorization for increasing the ILP. At the moment this feature is disabled by default and this commit should not cause any functional changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171436
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 3 Jan 2013 00:47:51 +0000 (00:47 +0000)]
Fix PR14732 by handling all kinds of IMPLICIT_DEF live ranges.
Most IMPLICIT_DEF instructions are removed by the ProcessImplicitDefs
pass, and a few are reinserted by PHIElimination when a PHI argument is
<undef>.
RegisterCoalescer was assuming that all IMPLICIT_DEF live ranges look
like those created by PHIElimination, and that their live range never
leaves the basic block.
The PR14732 test case does tricks with PHI nodes that causes a longer
IMPLICIT_DEF live range to appear. This happens very rarely, but
RegisterCoalescer should be able to handle it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171435
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 3 Jan 2013 00:46:43 +0000 (00:46 +0000)]
Make the type signature more strict.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171434
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Thu, 3 Jan 2013 00:00:40 +0000 (00:00 +0000)]
[CMake] MSVC is incorrectly emitting C4239 in some cases. Disable it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171430
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Wed, 2 Jan 2013 23:54:43 +0000 (23:54 +0000)]
Avoid vectorization when the function has the "noimplicitflot" attribute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171429
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 2 Jan 2013 23:52:13 +0000 (23:52 +0000)]
Extend the dumping infrastructure to deal with additional
sections for debug info. These are some of the dwo sections from the
DWARF5 split debug info proposal. Update the fission-cu.ll testcase
to show what we should be able to dump more of now.
Work in progress: Ultimately the relocations will be gone for the
dwo section and the strings will be a different form (as well as
the rest of the sections will be included).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171428
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 2 Jan 2013 23:45:09 +0000 (23:45 +0000)]
An intermediate step in the Attributes rewrite.
Modify the AttrBuilder class to store the attributes as a set instead of as a
bit mask. The Attribute class will represent only one attribute instead of a
collection of attributes.
This is the wave of the future!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171427
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Wed, 2 Jan 2013 22:13:01 +0000 (22:13 +0000)]
DAGCombiner: Avoid generating illegal vector INT_TO_FP nodes
DAGCombiner::reduceBuildVecConvertToConvertBuildVec() was making two
mistakes:
1. It was checking the legality of scalar INT_TO_FP nodes and then generating
vector nodes.
2. It was passing the result value type to
TargetLoweringInfo::getOperationAction() when it should have been
passing the value type of the first operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171420
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Wed, 2 Jan 2013 21:20:15 +0000 (21:20 +0000)]
Adds missing aliases for fcom and fcomp instructions without arguments.
Patch by Michael M Kuperstein!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171414
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 2 Jan 2013 21:19:08 +0000 (21:19 +0000)]
Use a bool instead of a bitfield in llvm/ADT/Optional.
Fixes Valgrind failures and removes bitwise operations that don't provide any benefit.
Valgrind failures reported by NAKAMURA Takumi.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171413
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Wed, 2 Jan 2013 20:23:49 +0000 (20:23 +0000)]
Restrict __builtin_assume_aligned to gcc 4.7+
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171408
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Wed, 2 Jan 2013 20:14:11 +0000 (20:14 +0000)]
[Support][Endian] Add support for specifying the alignment and native unaligned types.
* Add support for specifying the alignment to use.
* Add the concept of native endianness. Used for unaligned native types.
The native alignment and read/write simplification is based on a patch by Richard Smith.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171406
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 2 Jan 2013 19:42:53 +0000 (19:42 +0000)]
Don't #include stuff outside the include guards.
This defeats the include-guard optimization when parsing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171405
91177308-0d34-0410-b5e6-
96231b3b80d8
Shuxin Yang [Wed, 2 Jan 2013 18:26:31 +0000 (18:26 +0000)]
- Add comment to two functions which might be considered as dead code.
- Fix a typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171399
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Wed, 2 Jan 2013 17:41:03 +0000 (17:41 +0000)]
AVX: Fix a bug in WidenMaskArithmetic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171398
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Wed, 2 Jan 2013 17:40:39 +0000 (17:40 +0000)]
AVX: Fix a bug in WidenMaskArithmetic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171397
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 2 Jan 2013 12:09:16 +0000 (12:09 +0000)]
Actually update the CMake and Makefile builds correctly, and update the
code that includes Intrinsics.gen directly.
This never showed up in my testing because the old Intrinsics.gen was
still kicking around in the make build system and was correct there. =[
Thankfully, some of the bots to clean rebuilds and that caught this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171373
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 2 Jan 2013 11:56:33 +0000 (11:56 +0000)]
Update the examples for the new header file locations.
Sorry for the fallout here, I forgot the examples aren't built by
default any more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171371
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 2 Jan 2013 11:36:10 +0000 (11:36 +0000)]
Move all of the header files which are involved in modelling the LLVM IR
into their new header subdirectory: include/llvm/IR. This matches the
directory structure of lib, and begins to correct a long standing point
of file layout clutter in LLVM.
There are still more header files to move here, but I wanted to handle
them in separate commits to make tracking what files make sense at each
layer easier.
The only really questionable files here are the target intrinsic
tablegen files. But that's a battle I'd rather not fight today.
I've updated both CMake and Makefile build systems (I think, and my
tests think, but I may have missed something).
I've also re-sorted the includes throughout the project. I'll be
committing updates to Clang, DragonEgg, and Polly momentarily.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171366
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 2 Jan 2013 10:26:28 +0000 (10:26 +0000)]
Sort a few more #include lines in tools/... unittests/... and utils/...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171363
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 2 Jan 2013 10:22:59 +0000 (10:22 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171362
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 2 Jan 2013 09:27:25 +0000 (09:27 +0000)]
Update the root Makefile for VMCore -> IR. Missed by my original search
sadly, and is somewhat surprising in general.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171361
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 2 Jan 2013 09:22:59 +0000 (09:22 +0000)]
Update the configure scripts as well as the makefiles for the move from
VMCore to IR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171360
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 2 Jan 2013 09:10:48 +0000 (09:10 +0000)]
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)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171359
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 2 Jan 2013 08:00:39 +0000 (08:00 +0000)]
Merge SSE and AVX instruction definitions for scalar forms of SQRT, RSQRT, and RCP.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171356
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 2 Jan 2013 07:27:49 +0000 (07:27 +0000)]
Merge SSE and AVX instruction definitions for PSHUFD/PSHUFHW/PSHUFLW.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171355
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Wed, 2 Jan 2013 02:31:51 +0000 (02:31 +0000)]
docs: update docs/README.txt and make it useful.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171353
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 2 Jan 2013 01:35:11 +0000 (01:35 +0000)]
Revert 171351. It broke MC/X86/x86-32-avx.s.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171352
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 1 Jan 2013 20:53:20 +0000 (20:53 +0000)]
Merge SSE and AVX instruction definitions for scalar forms of SQRT, RSQRT, and RCP.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171351
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 1 Jan 2013 19:55:16 +0000 (19:55 +0000)]
Add IRBuilder::CreateVectorSplat and use it to simplify code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171349
91177308-0d34-0410-b5e6-
96231b3b80d8
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