Commit Graph

136247 Commits

Author SHA1 Message Date
Rafael Espindola b9d75ca84b Refactor some code into a new findMaterializedTemporary function.
llvm-svn: 166849
2012-10-27 00:43:14 +00:00
Rafael Espindola b413676cd7 Refactor some code into a new skipRValueSubobjectAdjustments function.
llvm-svn: 166848
2012-10-27 00:40:06 +00:00
Rafael Espindola e7b11f5241 Delay codegen to after collecting all SubobjectAdjustment so that the collection
can be refactored and used in Sema.

llvm-svn: 166847
2012-10-27 00:36:38 +00:00
Akira Hatanaka ac8c669985 Use the methods and classes that were added to simplify LowerCall and
LowerFormalArguments in MipsTargetLowering.

No functionality change intended.

llvm-svn: 166846
2012-10-27 00:29:43 +00:00
Akira Hatanaka 2a13402a66 Add method MipsTargetLowering::writeVarArgRegs which copies argument registers
of vararg functions back to the stack.

llvm-svn: 166844
2012-10-27 00:21:13 +00:00
Akira Hatanaka 35f55b1622 Add method MipsTargetLowering::passByValArg.
This method emits nodes for passing byval arguments in registers and stack.
This has the same functionality as existing functions PassByValArg64 and
WriteByValArg which will be deleted later.

llvm-svn: 166843
2012-10-27 00:16:36 +00:00
Akira Hatanaka 25dad19f0e Add method MipsTargetLowering::copyByValRegs.
This method copies byval arguments passed in registers onto the stack and has
the same functionality as existing functions CopyMips64ByValRegs and
ReadByValArg which will be deleted later.

llvm-svn: 166841
2012-10-27 00:10:18 +00:00
Akira Hatanaka 4a3711d077 Add class MipsCC which provides methods used to analyze formal and call
arguments and inquire about calling convention information.

llvm-svn: 166840
2012-10-26 23:56:38 +00:00
Jason Molenda aba75e6495 Show both lldb-168 and earlier "bt -c 5" as well as lldb-169 and later "bt 5" usage.
llvm-svn: 166839
2012-10-26 23:56:03 +00:00
Jason Molenda ca76ecda8a Document "bt <n>" for "thread backtrace -c <n>", note that it is available
in lldb-169 and later.

llvm-svn: 166838
2012-10-26 23:52:49 +00:00
Akira Hatanaka e485c65642 Delete MipsFunctionInfo::InArgFIRange.
llvm-svn: 166837
2012-10-26 23:49:51 +00:00
Nadav Rotem afae78edab Refactor the VectorTargetTransformInfo interface.
Add getCostXXX calls for different families of opcodes, such as casts, arithmetic, cmp, etc.

Port the LoopVectorizer to the new API.

The LoopVectorizer now finds instructions which will remain uniform after vectorization. It uses this information when calculating the cost of these instructions.

llvm-svn: 166836
2012-10-26 23:49:28 +00:00
Jakob Stoklund Olesen 1f06e7f00e Revert r163298 "Optimize codegen for VSETLNi{8,16,32} operating on Q registers."
Keep the integer_insertelement test case, the new coalescer can handle
this kind of lane insertion without help from pseudo-instructions.

llvm-svn: 166835
2012-10-26 23:39:46 +00:00
Kaelyn Uhrain 271fbb6445 Avoid an unused-variable warning when asserts are disabled.
llvm-svn: 166834
2012-10-26 23:28:41 +00:00
Eli Friedman ef5df7b8eb Fix typo.
llvm-svn: 166833
2012-10-26 23:25:42 +00:00
Eli Friedman fc5b2effcf Add missing safety check to an optimization for do-while loops. PR14191.
llvm-svn: 166832
2012-10-26 23:23:35 +00:00
Eli Friedman a7137bc1c2 Fix indentation.
llvm-svn: 166830
2012-10-26 23:05:34 +00:00
Jakob Stoklund Olesen 1dfe4fc60c Reduce indentation with early exit.
No functional change.

llvm-svn: 166829
2012-10-26 23:05:13 +00:00
Jakob Stoklund Olesen 7fa17d4bc8 Also make the current basic block a class member.
Don't pass it around everywhere as a function argument.

llvm-svn: 166828
2012-10-26 23:05:10 +00:00
Reed Kotler b650f6bbe7 implement mips16 tls global addr
llvm-svn: 166827
2012-10-26 22:57:32 +00:00
Argyrios Kyrtzidis c38395a0f7 In Parser::ParseDecltypeSpecifier, make sure the end location it returns
is at the end of parsed tokens when an error occurs, otherwise we'll hit
an assertion when trying to annotate the decltype tokens.

llvm-svn: 166826
2012-10-26 22:53:44 +00:00
Eli Friedman 0e84602d5c Don't crash synthesizing an ObjC property with an empty struct type. <rdar://problem/12547611>.
llvm-svn: 166825
2012-10-26 22:38:05 +00:00
Douglas Gregor 1423a5cfd7 When an externally-supplied record layout has a size that clearly
doesn't include padding up to the alignment of the record, take this
as a cue that the alignment of the record should (conservatively) be
set to 1. This is similar to other the other cues we use to determine
that the record has a lower alignment, e.g., that the
externally-supplied layout places fields at lower offsets than we
would. Fixes <rdar://problem/12582052>; test case in LLDB.

llvm-svn: 166824
2012-10-26 22:31:14 +00:00
Fariborz Jahanian 9dd2e0872e Add comment for my patch in r166809.
llvm-svn: 166823
2012-10-26 22:20:25 +00:00
Lang Hames a312bb0879 MCRegisterClass should be returned by const ref, not by value.
llvm-svn: 166822
2012-10-26 22:14:10 +00:00
Jordan Rose 2962d9599e Suggest llvm_unreachable over assert(0).
llvm-svn: 166821
2012-10-26 22:08:46 +00:00
Jakob Stoklund Olesen d788e32bf5 Make the Processed set a class member.
Don't pass it everywhere as an argument.

llvm-svn: 166820
2012-10-26 22:06:00 +00:00
Chad Rosier 8e71f7c2d8 [ms-inline asm] Add a comment.
llvm-svn: 166819
2012-10-26 22:01:25 +00:00
Jakob Stoklund Olesen e38018314e 80 col.
llvm-svn: 166818
2012-10-26 21:46:57 +00:00
Jakob Stoklund Olesen 410eae51f1 Remove ARMBaseRegisterInfo::isReservedReg().
It is just as easy to use MRI::isReserved() now.

llvm-svn: 166817
2012-10-26 21:43:05 +00:00
Jakob Stoklund Olesen e46a1046c0 Add GPRPair Register class to ARM.
Some instructions in ARM require 2 even-odd paired GPRs. This
patch adds support for such register class.

Patch by Weiming Zhao!

llvm-svn: 166816
2012-10-26 21:29:15 +00:00
Jakob Stoklund Olesen 112a44d9af Fix whitespace and function names to be coding standardy.
No functional change.

llvm-svn: 166814
2012-10-26 21:12:49 +00:00
Jakob Stoklund Olesen 09d69f5b0f Remove the canCombineSubRegIndices() target hook.
The new coalescer can already do all of this, so there is no need to
duplicate the efforts.

llvm-svn: 166813
2012-10-26 20:38:19 +00:00
Bill Schmidt 528d2f12b7 This patch is a follow-up to r166805. As suggested on-list, a check was
added to ensure no extra alignment code is added in the future.

llvm-svn: 166812
2012-10-26 20:34:52 +00:00
Fariborz Jahanian 5f8d32425d Remove BLOCK_BYREF_LAYOUT_BYREF flags from list of
flags for __block variable meta-data.

llvm-svn: 166811
2012-10-26 20:33:59 +00:00
Benjamin Kramer 6dc1e2f287 Remove LoopDependenceAnalysis.
It was unmaintained and not much more than a stub. The new DependenceAnalysis
pass is both more general and complete.

llvm-svn: 166810
2012-10-26 20:25:01 +00:00
Fariborz Jahanian 2d26c29e0c objective-C IRGen: for @implementation nested in
extern "C", its method definitions must be IRGen'ed
before meta-data for class is generated. Otherwise,
IRGen crashes (to say the least).
// rdar://12581683 

llvm-svn: 166809
2012-10-26 20:22:11 +00:00
Argyrios Kyrtzidis c2c77c42ef [driver] Before applying the working directory check if the input path
is absolute.

llvm-svn: 166808
2012-10-26 20:09:24 +00:00
Bill Schmidt 4a2dcfe5ee This patch addresses a 64-bit PowerPC ELF ABI compatibility issue with
varargs parameter passing.

A strict reading of the ABI indicates that any argument with alignment greater
than 8 may require skipping doublewords in the parameter save area to align
the argument, and hence require skipping GPRs.  In practice, this is not done
by GCC.  The alignment restriction is used for internal alignment of a
structure, but a structure with 16-byte alignment, for example, is not
itself 16-byte aligned in the parameter save area.  Although this is messy,
it has become the de facto standard used in building existing libraries.

My initial varargs support followed the ABI language, but not the de facto
standard.  Running the GCC compatibility test suite exposed this issue, and
indeed showed that LLVM didn't pass parameters self-consistently with my
original logic.  Removing the additional alignment logic allows the affected
tests to now pass.

I modified the ppc64-varargs-struct.c test case to remove the existing test
for generation of alignment code, which is no longer appropriate.

Built and tested on powerpc64-unknown-linux-gnu with no new regressions.

llvm-svn: 166805
2012-10-26 19:59:03 +00:00
Bill Wendling ec0fdc93b5 Remove the unneeded initializers.
llvm-svn: 166804
2012-10-26 19:52:54 +00:00
Derek Schuff 8f5eff7e76 Stop APInt::shl from generating llvm.trap
APInt::shl generated llvm.trap to guard against shifts greater than bit-width.
This was already checked with an assert, and there was a special case for
shifts equal to bit-width. Modify this check to catch shifts greater than or
equal to bit-width, so llvm.trap isn't generated.

Patch contributed by JF Bastien

llvm-svn: 166803
2012-10-26 19:52:27 +00:00
Hal Finkel e0d9db9953 Move target-specific BBVectorize tests into a separate directory.
llvm-svn: 166802
2012-10-26 19:38:09 +00:00
Argyrios Kyrtzidis 7ec3c09412 [options] Fix mishandling of aliased options that was introduced in r166444.
llvm-svn: 166801
2012-10-26 19:36:33 +00:00
Andrew Kaylor 9ed6ae5ee0 This patch updates comments in the Predicate class to describe a subtle behavior that callers may need to be aware. It also adds documentation for one function which didn’t have any.
The subtle behavior is that the Predicate wait functions may not detect transitory changes in the predicate value.  Consider the following scenario.

Thread A waits for a bit to be set in the predicate value.
Thread B sets the bit in the predicate value.
Before Thread A wakes up, Thread C clears the bit in the predicate value.
Thread A wakes, checks the value and goes back to waiting.

The mutex and condition variables protect access to the value, but they offer no guarantee that another thread will not acquire the mutex and change the value before a waiting thread is restarted after a change.

I believe that the current behavior is correct and reasonable.  I just want to leave a marker to prevent possible problems in the future or to help anyone who might be unfortunate enough to encounter such a problem.

llvm-svn: 166800
2012-10-26 19:28:36 +00:00
Jim Ingham d7b30ef93c Add API to get the process plugin name & short name.
llvm-svn: 166799
2012-10-26 19:18:04 +00:00
Daniel Dunbar 197157613c tests: Tweak unprintable.c to try another character which is hopefully even more
unprintable.

llvm-svn: 166798
2012-10-26 19:15:56 +00:00
Nadav Rotem fcd1af344c Move the target-specific tests, which require specific backends, to dirs that only run if the target is present.
llvm-svn: 166796
2012-10-26 18:52:01 +00:00
Rafael Espindola 4253bd8faf Change the internalize pass to internalize all symbols when given an empty
list of externals. This makes sense since a shared library with no symbols
can still be useful if it has static constructors.

llvm-svn: 166795
2012-10-26 18:47:48 +00:00
Benjamin Kramer 27328d0632 Lowercase the argument for TargetTransformInfo so it's consistent with all other passes.
llvm-svn: 166794
2012-10-26 18:46:15 +00:00
Chad Rosier 0130f82ccc [ms-inline asm] Add test case for r166792.
llvm-svn: 166793
2012-10-26 18:33:59 +00:00