OSDN Git Service
Bill Wendling [Mon, 8 Oct 2012 21:17:45 +0000 (21:17 +0000)]
Use a special path to place the .o files in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165428
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 8 Oct 2012 20:48:54 +0000 (20:48 +0000)]
Fixup comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165427
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 8 Oct 2012 20:48:49 +0000 (20:48 +0000)]
Fixup comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165426
91177308-0d34-0410-b5e6-
96231b3b80d8
Adhemerval Zanella [Mon, 8 Oct 2012 18:59:53 +0000 (18:59 +0000)]
PR12716: PPC crashes on vector compare
Vector compare using altivec 'vcmpxxx' instructions have as third argument
a vector register instead of CR one, different from integer and float-point
compares. This leads to a failure in code generation, where 'SelectSETCC'
expects a DAG with a CR register and gets vector register instead.
This patch changes the behavior by just returning a DAG with the
vector compare instruction based on the type. The patch also adds a testcase
for all vector types llvm defines.
It also included a fix on signed 5-bits predicates printing, where
signed values were not handled correctly as signed (char are unsigned by
default for PowerPC). This generates 'vspltisw' (vector splat)
instruction with SIM out of range.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165419
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Mon, 8 Oct 2012 18:54:00 +0000 (18:54 +0000)]
misched: remove the unused getSpecialAddressLatency hook.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165418
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Mon, 8 Oct 2012 18:53:57 +0000 (18:53 +0000)]
misched: remove forceUnitLatencies. Defaults are handled by the default SchedModel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165417
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Mon, 8 Oct 2012 18:53:53 +0000 (18:53 +0000)]
misched: avoid scheduling an instruction twice.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165416
91177308-0d34-0410-b5e6-
96231b3b80d8
Adhemerval Zanella [Mon, 8 Oct 2012 18:25:11 +0000 (18:25 +0000)]
PowerPC: Fix object creation with PPC::MTCRF8 instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165411
91177308-0d34-0410-b5e6-
96231b3b80d8
Adhemerval Zanella [Mon, 8 Oct 2012 17:27:24 +0000 (17:27 +0000)]
Add floating-point to and from integer conversion
This patch add altivec support for v4i32 to v4f32 and for v4f32 to
v4i32 vector rounding conversion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165409
91177308-0d34-0410-b5e6-
96231b3b80d8
Micah Villmow [Mon, 8 Oct 2012 17:06:25 +0000 (17:06 +0000)]
Fix the ocaml binding breakage from TargetData -> DataLayout changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165406
91177308-0d34-0410-b5e6-
96231b3b80d8
Micah Villmow [Mon, 8 Oct 2012 16:40:38 +0000 (16:40 +0000)]
Move TargetData to DataLayout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165404
91177308-0d34-0410-b5e6-
96231b3b80d8
Micah Villmow [Mon, 8 Oct 2012 16:39:34 +0000 (16:39 +0000)]
Move TargetData to DataLayout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165403
91177308-0d34-0410-b5e6-
96231b3b80d8
Micah Villmow [Mon, 8 Oct 2012 16:38:25 +0000 (16:38 +0000)]
Move TargetData to DataLayout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165402
91177308-0d34-0410-b5e6-
96231b3b80d8
Micah Villmow [Mon, 8 Oct 2012 16:37:04 +0000 (16:37 +0000)]
Move TargetData to DataLayout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165401
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Mon, 8 Oct 2012 13:06:30 +0000 (13:06 +0000)]
Some regression tests which are testing the old jit and are exercising functionality which is both known to be broken and not expected to be fixed in the old jit. To remove these from the regression test output, I've marked them XFAIL (for lit tests) and ifdef'd them out (unit tests). These modifications remove the last long-standing regression test failures from the buildbots (though updating the triple to reflect new ubuntu configuration has temporarily caused some new failures). Tested on x86-64 and ARM Linux.
Patch by David Tweed!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165390
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 7 Oct 2012 23:03:22 +0000 (23:03 +0000)]
Remove unused MachineInstr constructors that don't take a DebugLoc argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165382
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 7 Oct 2012 20:31:05 +0000 (20:31 +0000)]
Fix indentation. Remove 'else' after return. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165381
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Sun, 7 Oct 2012 18:49:28 +0000 (18:49 +0000)]
Silence Sphinx warnings.
Found the fix on this page:
http://permalink.gmane.org/gmane.comp.python.sphinx.devel/112
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165380
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 7 Oct 2012 15:34:27 +0000 (15:34 +0000)]
X86: fcmov doesn't handle all possible EFLAGS, fall back to a branch for the others.
Otherwise it will try to use SSE patterns and fail horribly if sse is disabled.
Fixes PR14035.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165377
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 7 Oct 2012 08:55:05 +0000 (08:55 +0000)]
Move more methods out-of-line. This is in preparation for changing the internal
contents of the Attributes class over to an AttributesImpl.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165373
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 7 Oct 2012 07:10:13 +0000 (07:10 +0000)]
Sphinxify the GettinStarted documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165372
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 7 Oct 2012 04:56:08 +0000 (04:56 +0000)]
Sphinxify the ExtendingLLVM documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165371
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 7 Oct 2012 04:34:10 +0000 (04:34 +0000)]
Sphinxify the compiler writer info documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165369
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Sun, 7 Oct 2012 01:11:19 +0000 (01:11 +0000)]
Make sure always-inline functions get inlined. <rdar://problem/
12423986>
Without this change, when the estimated cost for inlining a function with
an "alwaysinline" attribute was lower than the inlining threshold, the
getInlineCost function was returning that estimated cost rather than the
special InlineCost::AlwaysInlineCost value. That is fine in the normal
inlining case, but it can fail when the inliner considers the opportunity
cost of inlining into an internal or linkonce-odr function. It may decide
not to inline the always-inline function in that case. The fix here is just
to make getInlineCost always return the special value for always-inline
functions. I ran into this building clang with libc++. Tablegen failed to
link because of an always-inline function that was not inlined. I have been
unable to reduce the testcase down to a reasonable size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165367
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 7 Oct 2012 00:56:09 +0000 (00:56 +0000)]
Document MapVector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165366
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Sat, 6 Oct 2012 01:17:37 +0000 (01:17 +0000)]
Adding support for instructions mfc0, mfc2, mtc0, mtc2
move from and to coprocessors 0 and 2.
Contributer: Vladimir Medic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165351
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Sat, 6 Oct 2012 00:53:28 +0000 (00:53 +0000)]
Minor changes based on post commit review:
Contributer: Vladimir Medic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165350
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Fri, 5 Oct 2012 23:55:28 +0000 (23:55 +0000)]
Minor changes based on post commit review:
Contributer: Vladimir Medic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165346
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Fri, 5 Oct 2012 21:27:08 +0000 (21:27 +0000)]
This patch splits apart PPCISelLowering::LowerFormalArguments_Darwin_Or_64SVR4
into separate versions for the Darwin and 64-bit SVR4 ABIs. This will
facilitate doing more major surgery on the 64-bit SVR4 ABI in the near future.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165336
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Fri, 5 Oct 2012 20:52:13 +0000 (20:52 +0000)]
HowToSetUpLLVMStyleRTTI.rst: remove unneeded semicolons in code examples.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165335
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Fri, 5 Oct 2012 20:50:05 +0000 (20:50 +0000)]
GoldPlugin.rst: minor typesetting fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165334
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 5 Oct 2012 20:08:45 +0000 (20:08 +0000)]
Remove unused but set variable flagged by GCC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165331
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 5 Oct 2012 19:00:51 +0000 (19:00 +0000)]
[ms-inline asm] Add a comment describing the MapAndConstraints.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165326
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 5 Oct 2012 18:41:14 +0000 (18:41 +0000)]
[ms-inline asm] Add a few typedefs to simplify future changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165324
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Fri, 5 Oct 2012 18:27:54 +0000 (18:27 +0000)]
Patch for integer multiply, signed/unsigned, long/long long.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165322
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 5 Oct 2012 18:19:44 +0000 (18:19 +0000)]
Simplify code, don't or a bool with an uint64_t.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165321
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 5 Oct 2012 17:41:49 +0000 (17:41 +0000)]
Remove empty file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165320
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 5 Oct 2012 17:15:19 +0000 (17:15 +0000)]
Remove extraneous semicolon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165319
91177308-0d34-0410-b5e6-
96231b3b80d8
Micah Villmow [Fri, 5 Oct 2012 17:02:14 +0000 (17:02 +0000)]
Implement TargetData with the DataLayout class, this will allow LLVM projects to transition to DataLayout without loosing functionality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165318
91177308-0d34-0410-b5e6-
96231b3b80d8
Hemant Kulkarni [Fri, 5 Oct 2012 15:16:53 +0000 (15:16 +0000)]
Add ELF program header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165316
91177308-0d34-0410-b5e6-
96231b3b80d8
Will Schmidt [Fri, 5 Oct 2012 15:16:11 +0000 (15:16 +0000)]
- Mark the BCC and BLR defs as isCodeGenOnly per error output from
llvm-tblgen -gen-asm-matcher.
PPCInstrInfo.td | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165315
91177308-0d34-0410-b5e6-
96231b3b80d8
Adhemerval Zanella [Fri, 5 Oct 2012 14:32:46 +0000 (14:32 +0000)]
Add PowerPC64 definitions for ELF.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165314
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 5 Oct 2012 14:10:29 +0000 (14:10 +0000)]
Enable llvm/test/ExecutionEngine/MCJIT also for cygwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165313
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 5 Oct 2012 14:10:23 +0000 (14:10 +0000)]
lli: [MCJIT] Suppress "__main" for cygming in LLIMCJITMemoryManager::getPointerToNamedFunction(), like legacy JITMemoryManager's.
CRT's __main (aka premain) invokes global ctors on cygming. See also PR3897.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165312
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 5 Oct 2012 14:10:17 +0000 (14:10 +0000)]
[CMake] Enhance add_llvm_external_project.
- Substitute hyphen to underscore, s/-/_/g, as the variable name.
- Additional parameter can be specified as the name of directory.
e.g.) add_llvm_external_project(clang-tools-extra extra)
- LLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR=/path/to/llvm-srcroot/tools/clang/tools/extra, by default.
- Build directory is in ${CMAKE_CURRENT_BINARY_DIR}/extra
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165311
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 5 Oct 2012 13:56:23 +0000 (13:56 +0000)]
SROA.cpp: Fix a warning, [-Wunused-variable]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165309
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 5 Oct 2012 13:32:38 +0000 (13:32 +0000)]
Convert to unix line endings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165308
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 5 Oct 2012 07:29:46 +0000 (07:29 +0000)]
Move this test a bit later, after the point at which we know that we either
have an alloca or a parameter, since then the alloca test should make sense
to readers, while before it probably appears too specific. No functionality
change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165306
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 5 Oct 2012 06:44:41 +0000 (06:44 +0000)]
Move methods out-of-line.
The internal representation of the Attributes class will be opaque. All of the
query methods will need to query the opaque class. Therefore, these methods need
to be out-of-line.
No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165305
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 5 Oct 2012 06:18:50 +0000 (06:18 +0000)]
Use method to query for attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165304
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 5 Oct 2012 06:11:52 +0000 (06:11 +0000)]
Remove some encoding bits I forgot to remove from SETB_C16r and SETB_C64r in r165302.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165303
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 5 Oct 2012 06:05:15 +0000 (06:05 +0000)]
Move expansion of SETB_C(8/16/32/64)r from MCInstLower to ExpandPostRAPseudos and mark them as pseudos in the td file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165302
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Fri, 5 Oct 2012 03:32:01 +0000 (03:32 +0000)]
docs: Add HowToSetUpLLVMStyleRTTI.rst.
This document describes how to set up LLVM-style RTTI for a class
hierarchy. Surprisingly, this was not previously documented.
Also, link it into ProgrammersManual.html.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165293
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Fri, 5 Oct 2012 03:32:00 +0000 (03:32 +0000)]
tblgen: Use appropriate LLVM-style RTTI functions.
Use isa<> or cast<> when semantically that is what is happening. Also
some trivial "style" cleanups at fix sites.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165292
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Fri, 5 Oct 2012 03:31:58 +0000 (03:31 +0000)]
tblgen: Replace uses of dynamic_cast<XXXRecTy> with dyn_cast<>.
This is a mechanical change of dynamic_cast<> to dyn_cast<>. A number of
these uses are actually more like isa<> or cast<>, and will be changed
to the semanticaly appropriate one in a future patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165291
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Fri, 5 Oct 2012 03:31:56 +0000 (03:31 +0000)]
tblgen: Put dyn_cast<> infrastructure in place for RecTy hierarchy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165290
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 5 Oct 2012 01:49:14 +0000 (01:49 +0000)]
Make sure to generate the right kind of MDNode for enum forward declarations.
PR14029, LLVM part.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165288
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 5 Oct 2012 01:48:22 +0000 (01:48 +0000)]
Follow up to r165072. Try a different approach: only move the load when it's going to be folded into the call. rdar://
12437604
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165287
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 5 Oct 2012 01:29:09 +0000 (01:29 +0000)]
Teach the new SROA a new trick. Now we zap any memcpy or memmoves which
are in fact identity operations. We detect these and kill their
partitions so that even splitting is unaffected by them. This is
particularly important because Clang relies on emitting identity memcpy
operations for struct copies, and these fold away to constants very
often after inlining.
Fixes the last big performance FIXME I have on my plate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165285
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 5 Oct 2012 01:29:06 +0000 (01:29 +0000)]
Lift the speculation visitor above all the helpers that are targeted at
the rewrite visitor to make the fact that the speculation is completely
independent a bit more clear.
I promise that this is just a cut/paste of the one visitor and adding
the annonymous namespace wrappings. The diff may look completely
preposterous, it does in git for some reason.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165284
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 5 Oct 2012 00:22:46 +0000 (00:22 +0000)]
Use -object_path_lto when linking executables if building Apple style.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165282
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 4 Oct 2012 23:59:38 +0000 (23:59 +0000)]
[ms-inline asm] Add support for parsing [Intel dialect] memory operands that use
segmented registers. Test case to come.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165275
91177308-0d34-0410-b5e6-
96231b3b80d8
Micah Villmow [Thu, 4 Oct 2012 23:01:22 +0000 (23:01 +0000)]
Rename the Target specific passes in the DataLayout class to be Target agnostic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165270
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 4 Oct 2012 22:35:15 +0000 (22:35 +0000)]
When merging connsecutive stores, use vectors to store the constant zero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165267
91177308-0d34-0410-b5e6-
96231b3b80d8
Micah Villmow [Thu, 4 Oct 2012 22:08:14 +0000 (22:08 +0000)]
Resubmit the copying of TargetData to DataLayout without any changes to the files, this should fix the problems and the changes to rename to DataLayout will come next.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165262
91177308-0d34-0410-b5e6-
96231b3b80d8
Preston Gurd [Thu, 4 Oct 2012 21:33:40 +0000 (21:33 +0000)]
This patch corrects commit 165126 by using an integer bit width instead of
a pointer to a type, in order to remove the uses of getGlobalContext().
Patch by Tyler Nowicki.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165255
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 4 Oct 2012 21:33:24 +0000 (21:33 +0000)]
ARM: locate user-defined text sections next to default text.
Make sure functions located in user specified text sections (via the
section attribute) are located together with the default text sections.
Otherwise, for large object files, the relocations for call instructions
are more likely to be out of range. This becomes even more likely in the
presence of LTO.
rdar://
12402636
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165254
91177308-0d34-0410-b5e6-
96231b3b80d8
Micah Villmow [Thu, 4 Oct 2012 21:08:50 +0000 (21:08 +0000)]
Backing out my changes, something screwed up from my patches, starting over.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165253
91177308-0d34-0410-b5e6-
96231b3b80d8
Micah Villmow [Thu, 4 Oct 2012 20:49:16 +0000 (20:49 +0000)]
Rename TargetData to DataLayout in DataLayout.cpp. This should fix a build failure from r165249 where the wrong version of the file was submitted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165251
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 4 Oct 2012 20:46:14 +0000 (20:46 +0000)]
Update this a bit more to represent how the prologue should work:
a) frame setup instructions define the prologue
b) we shouldn't change our location mid-stream
Add a test to make sure that the stack adjustment stays within
the prologue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165250
91177308-0d34-0410-b5e6-
96231b3b80d8
Micah Villmow [Thu, 4 Oct 2012 20:44:22 +0000 (20:44 +0000)]
Create the DataLayout class, as a direct copy of TargetData.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165249
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Thu, 4 Oct 2012 20:29:44 +0000 (20:29 +0000)]
Adding MCJIT and MemoryBuffer unit tests
Patch by Daniel Malea.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165246
91177308-0d34-0410-b5e6-
96231b3b80d8
Micah Villmow [Thu, 4 Oct 2012 20:08:28 +0000 (20:08 +0000)]
Accidently checked in the files, only wanted to copy them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165244
91177308-0d34-0410-b5e6-
96231b3b80d8
Micah Villmow [Thu, 4 Oct 2012 20:06:07 +0000 (20:06 +0000)]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165243
91177308-0d34-0410-b5e6-
96231b3b80d8
Micah Villmow [Thu, 4 Oct 2012 20:05:12 +0000 (20:05 +0000)]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165242
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Thu, 4 Oct 2012 19:50:43 +0000 (19:50 +0000)]
Add register encoding support in X86 backend
- Add 'HwEncoding' for X86 registers and call getEncodingValue() to
retrieve their encoding values.
- This's the first step to adopt new scheme. Furthur revising is onging.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165241
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Thu, 4 Oct 2012 19:10:44 +0000 (19:10 +0000)]
Fix doxygen comment to match parameters' names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165239
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Thu, 4 Oct 2012 19:08:30 +0000 (19:08 +0000)]
Add a comment to the commit r165187.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165238
91177308-0d34-0410-b5e6-
96231b3b80d8
Will Schmidt [Thu, 4 Oct 2012 18:14:28 +0000 (18:14 +0000)]
- add tokens to PPCInstrInfo.td and PPCInstr64Bit.td to resolve
"Instruction 'foo' has no tokens" errors during llvm-tblgen
-gen-asm-matcher attempts. At this time, the added
tokens are "#comment" style rather than the actual mnemonic. This will
be revisited once the rest of the base asmparser bits get straightened
out for ppc64-elf-linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165237
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 4 Oct 2012 17:30:43 +0000 (17:30 +0000)]
Get MCSchedModel directly from the subtarget.
Not all targets have itineraries, but the subtarget always has an
MCSchedModel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165236
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 4 Oct 2012 17:30:40 +0000 (17:30 +0000)]
Switch MachineTraceMetrics to the new TargetSchedModel interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165235
91177308-0d34-0410-b5e6-
96231b3b80d8
Will Schmidt [Thu, 4 Oct 2012 16:20:24 +0000 (16:20 +0000)]
test commit / whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165233
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 4 Oct 2012 16:11:49 +0000 (16:11 +0000)]
SimplifyCFG: Enhance the "remove CFG edge that leads to null pointer dereference" optimization to also handle instructions with multiple uses.
We conservatively only check the first use to avoid walking long use chains.
This catches the common case of having both a load and a store to a pointer
supplied by a PHI node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165232
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 4 Oct 2012 13:53:21 +0000 (13:53 +0000)]
In my recent change to avoid use of underaligned memory I didn't notice that
cpyDest can be mutated in some cases, which would then cause a crash later if
indeed the memory was underaligned. This brought down several buildbots, so
I guess the underaligned case is much more common than I thought!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165228
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 4 Oct 2012 13:36:31 +0000 (13:36 +0000)]
The alignment of an sret parameter is known: it must be at least the
alignment of the return type. Teach the optimizers this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165226
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 4 Oct 2012 13:12:43 +0000 (13:12 +0000)]
Hoist some grossly duplicated code from the COFF/ELF/MachO streamers into MCObjectStreamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165225
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 4 Oct 2012 13:07:26 +0000 (13:07 +0000)]
Fix wrong name in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165224
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 4 Oct 2012 12:33:50 +0000 (12:33 +0000)]
Fix PR13969, a mini-phase-ordering issue with the new SROA pass.
Currently, we re-visit allocas when something changes about the way they
might be *split* to allow better scalarization to take place. However,
we weren't handling the case when the *promotion* is what would change
the behavior of SROA. When an address derived from an alloca is stored
into another alloca, we consider the first to have escaped. If the
second is ever promoted to an SSA value, we will suddenly be able to run
the SROA pass on the first alloca.
This patch adds explicit support for this form if iteration. When we
detect a store of a pointer derived from an alloca, we flag the
underlying alloca for reprocessing after promotion. The logic works hard
to only do this when there is definitely going to be promotion and it
might remove impediments to the analysis of the alloca.
Thanks to Nick for the great test case and Benjamin for some sanity
check review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165223
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 4 Oct 2012 10:54:40 +0000 (10:54 +0000)]
The memcpy optimizer was happily doing call slot forwarding when the new memory
was less aligned than the old. In the testcase this results in an overaligned
memset: the memset alignment was correct for the original memory but is too much
for the new memory. Fix this by either increasing the alignment of the new
memory or bailing out if that isn't possible. Should fix the gcc-4.7 self-host
buildbot failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165220
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 4 Oct 2012 10:39:28 +0000 (10:39 +0000)]
Teach the integer-promotion rewrite strategy to be endianness aware.
Sorry for this being broken so long. =/
As part of this, switch all of the existing tests to be Little Endian,
which is the behavior I was asserting in them anyways! Add in a new
big-endian test that checks the interesting behavior there.
Another part of this is to tighten the rules abotu when we perform the
full-integer promotion. This logic now rejects cases where there fully
promoted integer is a non-multiple-of-8 bitwidth or cases where the
loads or stores touch bits which are in the allocated space of the
alloca but are not loaded or stored when accessing the integer. Sadly,
these aren't really observable today as the rest of the pass will
already ensure the invariants hold. However, the latter situation is
likely to become a potential concern in the future.
Thanks to Benjamin and Duncan for early review of this patch. I'm still
looking into whether there are further endianness issues, please let me
know if anyone sees BE failures persisting past this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165219
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 4 Oct 2012 07:19:46 +0000 (07:19 +0000)]
Use method to query if there are attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165213
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 4 Oct 2012 07:18:12 +0000 (07:18 +0000)]
Add method to query for NoCapture attribute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165212
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 4 Oct 2012 07:17:46 +0000 (07:17 +0000)]
Use method to query for NoAlias attribute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165211
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 4 Oct 2012 07:08:30 +0000 (07:08 +0000)]
Use attribute query methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165210
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 4 Oct 2012 06:58:52 +0000 (06:58 +0000)]
Use method to query for attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165209
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 4 Oct 2012 06:52:09 +0000 (06:52 +0000)]
Add method to query for 'NoAlias' attribute on call/invoke instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165208
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 4 Oct 2012 06:49:41 +0000 (06:49 +0000)]
Use method to query for attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165207
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 4 Oct 2012 06:48:57 +0000 (06:48 +0000)]
Query for attributes via the correct method call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165206
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 4 Oct 2012 06:43:21 +0000 (06:43 +0000)]
Use new accessor methods to query for attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165205
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Thu, 4 Oct 2012 05:28:50 +0000 (05:28 +0000)]
[tsan] add 3 internal flags for fine-grain control of what is instrumented and what is not.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165204
91177308-0d34-0410-b5e6-
96231b3b80d8