1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

88668 Commits

Author SHA1 Message Date
Chad Rosier
90a4bf0816 Initialize SSPBufferSize. PR14999. Patch by Vinson Lee.
llvm-svn: 173285
2013-01-23 19:32:37 +00:00
Bill Wendling
9ee1ad34e6 Remove unused methods and ivars.
llvm-svn: 173284
2013-01-23 19:06:01 +00:00
Benjamin Kramer
90ac6c1a88 Revert "InstCombine: Clean up weird code that talks about a modulus that's long gone."
This causes crashes during the build of compiler-rt during selfhost. Add a
testcase for coverage.

llvm-svn: 173279
2013-01-23 17:52:29 +00:00
Benjamin Kramer
cb0126b7dc InstCombine: Clean up weird code that talks about a modulus that's long gone.
This does the right thing unless the multiplication overflows, but the old code
didn't handle that case either.

llvm-svn: 173276
2013-01-23 17:16:22 +00:00
Eli Bendersky
57102d235e Fix powerpc test failure - forgot to initialize stack slot size for PPCLinuxMCAsmInfo
llvm-svn: 173275
2013-01-23 17:12:15 +00:00
Eli Bendersky
9e87cb51e6 Clean up assignment of CalleeSaveStackSlotSize: get rid of the default and explicitly set this in every target that needs to change it from the default.
llvm-svn: 173270
2013-01-23 16:22:04 +00:00
Benjamin Kramer
7cbfce9f41 NVPTX: Stop leaking memory by using a managed constant instead of a new Argument.
This is still an egregious hack since we don't have a nice interface for this
kind of thing but should help the valgrind leak check buildbot to become green.

llvm-svn: 173267
2013-01-23 15:21:44 +00:00
Anton Korobeynikov
753fed104a Make sure metarenamer won't rename special stuff (intrinsics and explicitly renamed stuff).
Otherwise this might hide the problems.

llvm-svn: 173265
2013-01-23 15:03:08 +00:00
Kostya Serebryany
c1d5734eb0 [asan] use ADD instead of OR when applying shadow offset of PowerPC. See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55975 for details
llvm-svn: 173258
2013-01-23 12:54:55 +00:00
Duncan Sands
4c9216412c Initialize the components of this class. Otherwise GCC thinks that Array may be
used uninitialized, since it fails to understand that Array is only used when
SingleValue is not, and outputs a warning.  It also seems generally safer given
that the constructor is non-trivial and has plenty of early exits.

llvm-svn: 173242
2013-01-23 09:09:50 +00:00
NAKAMURA Takumi
d0d93db5cb llvm/unittests: Use OwningPtr to fix --vg-leak.
llvm-svn: 173240
2013-01-23 08:33:13 +00:00
NAKAMURA Takumi
634ae981a3 IRTests/WaymarkTest.cpp: Fix in --vg-leak.
llvm-svn: 173239
2013-01-23 08:33:05 +00:00
NAKAMURA Takumi
be9f7c27f1 IRTests/IRBuilderTest.cpp: GetIntTy: Delete DL at yourself since it is not linked.
llvm-svn: 173238
2013-01-23 08:31:28 +00:00
NAKAMURA Takumi
9a7842a6f2 IRTests/IRBuilderTest.cpp: Let GV added to the module.
It fixes --vg-leak.

llvm-svn: 173237
2013-01-23 08:30:39 +00:00
NAKAMURA Takumi
71fc8c35b0 IRTests/ConstantsTest.cpp: AsInstructionsTest: Delete each instruction immediately if it is not linked.
llvm-svn: 173236
2013-01-23 08:30:26 +00:00
NAKAMURA Takumi
90605a6d70 Untabify.
llvm-svn: 173235
2013-01-23 08:30:21 +00:00
NAKAMURA Takumi
b34fb03d75 Whitespace.
llvm-svn: 173234
2013-01-23 08:30:15 +00:00
NAKAMURA Takumi
29f8905caa DominatorTreeTest.cpp: Add the file header.
llvm-svn: 173233
2013-01-23 08:30:10 +00:00
Bill Wendling
fd64018774 Add the heuristic to differentiate SSPStrong from SSPRequired.
The requirements of the strong heuristic are:

* A Protector is required for functions which contain an array, regardless of
  type or length.

* A Protector is required for functions which contain a structure/union which
  contains an array, regardless of type or length.  Note, there is no limit to
  the depth of nesting.

* A protector is required when the address of a local variable (i.e., stack
  based variable) is exposed. (E.g., such as through a local whose address is
  taken as part of the RHS of an assignment or a local whose address is taken as
  part of a function argument.)

llvm-svn: 173231
2013-01-23 06:43:53 +00:00
Bill Wendling
9e0064d80b Add the IR attribute 'sspstrong'.
SSPStrong applies a heuristic to insert stack protectors in these situations:

* A Protector is required for functions which contain an array, regardless of
  type or length.

* A Protector is required for functions which contain a structure/union which
  contains an array, regardless of type or length.  Note, there is no limit to
  the depth of nesting.

* A protector is required when the address of a local variable (i.e., stack
  based variable) is exposed. (E.g., such as through a local whose address is
  taken as part of the RHS of an assignment or a local whose address is taken as
  part of a function argument.)

This patch implements the SSPString attribute to be equivalent to
SSPRequired. This will change in a subsequent patch.

llvm-svn: 173230
2013-01-23 06:41:41 +00:00
Bill Wendling
c31f99d129 Remove the last of uses that use the Attribute object as a collection of attributes.
Collections of attributes are handled via the AttributeSet class now. This
finally frees us up to make significant changes to how attributes are structured.

llvm-svn: 173228
2013-01-23 06:14:59 +00:00
Sean Silva
847c45cff5 docs: Update title of external tutorial.
llvm-svn: 173224
2013-01-23 03:21:41 +00:00
Tom Stellard
f62a46f5e9 R600: rework handling of the constants
Remove Cxxx registers, add new special register - "ALU_CONST" and new
operand for each alu src - "sel". ALU_CONST is used to designate that the
new operand contains the value to override src.sel, src.kc_bank, src.chan
for constants in the driver.

Patch by: Vadim Girlin

Vincent Lejeune:
  - Use pointers for constants
  - Fold CONST_ADDRESS when possible

Tom Stellard:
  - Give CONSTANT_BUFFER_0 its own address space
  - Use integer types for constant loads

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 173222
2013-01-23 02:09:06 +00:00
Tom Stellard
48aa269492 R600: Add a CONST_ADDRESS node to model constant buf read
Patch by: Vincent Lejeune

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 173221
2013-01-23 02:09:03 +00:00
Tom Stellard
8899509f04 R600: Factorise VTX_WORD0 and VTX_WORD1 in tblgen def
Patch by: Vincent Lejeune

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 173220
2013-01-23 02:09:01 +00:00
Nadav Rotem
52f5279653 Add support for reverse pointer induction variables. These are loops that contain pointers that count backwards.
For example, this is the hot loop in BZIP:

  do {
    m = *--p;
    *p = ( ... );
  } while (--n);

llvm-svn: 173219
2013-01-23 01:35:00 +00:00
Bill Wendling
e11164c08d Use the AttributeSet when removing multiple attributes. Use Attribute::AttrKind
when removing one attribute. This further encapsulates the use of the attributes.

llvm-svn: 173214
2013-01-23 00:45:55 +00:00
Michael J. Spencer
ddaa5b9eea [Support][ErrorOr] Don't use nullptr :(
llvm-svn: 173212
2013-01-23 00:22:30 +00:00
Bill Wendling
627f56935c Use the AttributeSet when adding multiple attributes and an Attribute::AttrKind
when adding a single attribute to the function.

llvm-svn: 173210
2013-01-23 00:20:53 +00:00
Michael J. Spencer
a34e71c387 [Support][ErrorOr] Add optimized specialization of ErrorOr<void>.
ErrorOr<void> represents an operation that returns nothing, but can still fail.
It should be used in cases where you need the aditional user data that ErrorOr
provides over error_code.

llvm-svn: 173209
2013-01-23 00:18:31 +00:00
Richard Osborne
6453bd631a Add instruction encodings / disassembly support for u10 / lu10 instructions.
llvm-svn: 173204
2013-01-22 22:55:04 +00:00
Michael J. Spencer
faeb8e48a9 [Support][ErrorOr] Make old gcc happy.
Apparently this is how C++98 worked pre-DR. (Thanks Richard).

llvm-svn: 173203
2013-01-22 22:48:46 +00:00
Michael Gottesman
1b1c476a4c Fixed typo.
llvm-svn: 173202
2013-01-22 21:53:43 +00:00
Michael Gottesman
8eb9360a37 [ObjCARC] Refactored out the inner most 2-loops from PerformCodePlacement into the method ConnectTDBUTraversals.
The method PerformCodePlacement was doing too much (i.e. 3x loops, lots of
different checking). This refactoring separates the analysis section of the
method into a separate function while leaving the actual code placement and
analysis preparation in PerformCodePlacement.

*NOTE* Really this part of ObjCARC should be refactored out of the main pass
class into its own seperate class/struct. But, it is not time to make that
change yet though (don't want to make such an invasive change without fixing all
of the bugs first).

llvm-svn: 173201
2013-01-22 21:49:00 +00:00
Michael Liao
f1ce1e547c Fix an issue of pseudo atomic instruction DAG schedule
- Add list of physical registers clobbered in pseudo atomic insts
  Physical registers are clobbered when pseudo atomic instructions are
  expanded. Add them in clobber list to prevent DAG scheduler to
  mis-schedule them after these insns are declared side-effect free.
- Add test case from Michael Kuperstein <michael.m.kuperstein@intel.com>

llvm-svn: 173200
2013-01-22 21:47:38 +00:00
Kevin Enderby
042547700a Add a warning when there is a macro defintion that has named parameters but
the body does not use them and it appears the body has positional parameters.

This can cause unexpected results as in the added test case.  As the darwin
version of gas(1) which only supported positional parameters, happened to
ignore the named parameters.  Now that we want to support both styles of
macros we issue a warning in this specific case.

rdar://12861644

llvm-svn: 173199
2013-01-22 21:44:53 +00:00
Akira Hatanaka
80ebf0332e [mips] Implement MipsRegisterInfo::getRegPressureLimit.
llvm-svn: 173197
2013-01-22 21:34:25 +00:00
Bill Wendling
82711f5390 More encapsulation work.
Use the AttributeSet when we're talking about more than one attribute. Add a
function that adds a single attribute. No functionality change intended.

llvm-svn: 173196
2013-01-22 21:15:51 +00:00
Kevin Enderby
8bfddfebbb Have the integrated assembler give an error if $1 is used as an identifier in
an expression.  Currently this bug causes the line to be ignored in a
release build and an assert in a debug build.

rdar://13062484

llvm-svn: 173195
2013-01-22 21:09:20 +00:00
Akira Hatanaka
390115c18e [mips] Clean up code in MipsTargetLowering::LowerCall. No functional change
intended

llvm-svn: 173189
2013-01-22 20:05:56 +00:00
Eli Bendersky
ecccd87e5e Add forgotten test case for the x32 commit
llvm-svn: 173181
2013-01-22 18:52:39 +00:00
Benjamin Kramer
f2fc27452c X86: Make sure we account for the FMA4 register immediate value, otherwise rip-rel relocations will be off by one byte.
PR15040.

llvm-svn: 173176
2013-01-22 18:05:59 +00:00
Eli Bendersky
36076df691 Initial patch for x32 ABI support.
Add the x32 environment kind to the triple, and separate the concept of
pointer size and callee save stack slot size, since they're not equal
on x32.

llvm-svn: 173175
2013-01-22 18:02:49 +00:00
Dmitri Gribenko
dd72a4df79 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: 173163
2013-01-22 14:39:21 +00:00
Alexey Samsonov
17eb4abe97 llvm-symbolizer: factor out bits of the tool into separate LLVMSymbolize.{h,cpp} files. No functionality change.
llvm-svn: 173159
2013-01-22 14:21:19 +00:00
Evgeniy Stepanov
576e5906c5 [msan] Export the value of msan-keep-going flag for the runtime.
llvm-svn: 173156
2013-01-22 13:26:53 +00:00
Evgeniy Stepanov
b64d00f355 [msan] Do not insert check on volatile store.
Volatile bitfields can cause valid stores of uninitialized bits.

llvm-svn: 173153
2013-01-22 12:30:52 +00:00
Tim Northover
ba9ffbd317 Fix truncation of relocation types in Support/ELF.h
This is a follow-up to r171845, which fixes the same issue in the Support code.
Only targets with >256 relocations (principally AArch64) should be affected.

llvm-svn: 173151
2013-01-22 12:01:43 +00:00
Chandler Carruth
e7f6a7e82e Begin fleshing out an interface in TTI for modelling the costs of
generic function calls and intrinsics. This is somewhat overlapping with
an existing intrinsic cost method, but that one seems targetted at
vector intrinsics. I'll merge them or separate their names and use cases
in a separate commit.

This sinks the test of 'callIsSmall' down into TTI where targets can
control it. The whole thing feels very hack-ish to me though. I've left
a FIXME comment about the fundamental design problem this presents. It
isn't yet clear to me what the users of this function *really* care
about. I'll have to do more analysis to figure that out. Putting this
here at least provides it access to proper analysis pass tools and other
such. It also allows us to more cleanly implement the baseline cost
interfaces in TTI.

With this commit, it is now theoretically possible to simplify much of
the inline cost analysis's handling of calls by calling through to this
interface. That conversion will have to happen in subsequent commits as
it requires more extensive restructuring of the inline cost analysis.

The CodeMetrics class is now really only in the business of running over
a block of code and aggregating the metrics on that block of code, with
the actual cost evaluation done entirely in terms of TTI.

llvm-svn: 173148
2013-01-22 11:26:02 +00:00
NAKAMURA Takumi
48e4712d87 ADT/SparseMultiSetTest.cpp: Try to appease cygwin-clang on stage2, take two. [-Wsign-compare]
llvm-svn: 173144
2013-01-22 10:39:31 +00:00