Commit Graph

144036 Commits

Author SHA1 Message Date
Cameron Zwarich 8e60d4d240 Add support to the two-address pass for updating LiveIntervals in many of the
common transformations. This includes updating repairIntervalsInRange() to
handle more cases.

llvm-svn: 175604
2013-02-20 06:46:48 +00:00
Cameron Zwarich 2991feb0d3 Move the computation of the IsEarlyClobber flag into its own loop, since the
correct value is needed in every iteration of the loop for updating
LiveIntervals.

llvm-svn: 175603
2013-02-20 06:46:46 +00:00
Cameron Zwarich c04679f033 Modify LiveInterval::addRange() to match the comment about what it returns.
llvm-svn: 175602
2013-02-20 06:46:44 +00:00
Cameron Zwarich 2941482387 Add SlotIndexes::repairIndexesInRange(), which repairs SlotIndexes after adding
and removing instructions. The implementation seems more complicated than it
needs to be, but I couldn't find something simpler that dealt with all of the
corner cases.

Also add a call to repairIndexesInRange() from repairIntervalsInRange().

llvm-svn: 175601
2013-02-20 06:46:41 +00:00
Cameron Zwarich 26ef663c42 Make SlotIndex::getEntry() return unsigned to match IndexListEntry.
llvm-svn: 175600
2013-02-20 06:46:39 +00:00
Cameron Zwarich 11e8d50891 Fix a misunderstanding about how RegMaskBlocks works. This was caught by
assertions in the register allocator when running 'make check' without
LiveVariables.

llvm-svn: 175599
2013-02-20 06:46:36 +00:00
Cameron Zwarich 3673581de9 Remove verification after PHIElimination when using LiveIntervals, and move it
after the two-address pass. The remaining problems in 'make check' are occurring
later.

llvm-svn: 175598
2013-02-20 06:46:34 +00:00
Cameron Zwarich 68fbc4f642 Avoid recomputing an inserted instruction's SlotIndex.
llvm-svn: 175597
2013-02-20 06:46:32 +00:00
Cameron Zwarich 37ca2e81d8 Add preservation of SlotIndexes to PHIElimination.
llvm-svn: 175596
2013-02-20 06:46:28 +00:00
David Blaikie 532aff8cd0 Rename llvm::Optional<T>::Reset to 'reset' as per LLVM naming conventions.
Code review feedback on r175580 from Jordan Rose.

llvm-svn: 175595
2013-02-20 06:25:36 +00:00
David Blaikie 2fdacbc5b0 Replace SVal llvm::cast support to be well-defined.
See r175462 for another example/more details.

llvm-svn: 175594
2013-02-20 05:52:05 +00:00
Reed Kotler 7b503c2b03 Expand pseudos/macros:
SltCCRxRy16, SltiCCRxImmX16, SltiuCCRxImmX16, SltuCCRxRy16
$T8 shows up as register $24 when emitted from C++ code so we had
to change some tests that were already there for this functionality.

llvm-svn: 175593
2013-02-20 05:45:15 +00:00
Michael J. Spencer 6a8746b7e6 [llvm-readobj] Add ELF .dynamic table dumping.
llvm-svn: 175592
2013-02-20 02:37:12 +00:00
Enrico Granata e5631635bf Lastly, a few synthetic children classes for Cocoa are available
llvm-svn: 175591
2013-02-20 02:27:07 +00:00
Enrico Granata 710d88fd64 And the NSString formatter is not Python anymore
llvm-svn: 175590
2013-02-20 02:24:20 +00:00
Enrico Granata df21e40f94 Data formatters are not a *recent* addition...
llvm-svn: 175589
2013-02-20 02:22:00 +00:00
Jordan Rose e2b34142c3 intmax_t is long long on Darwin, not long.
<rdar://problem/11540697>

llvm-svn: 175588
2013-02-20 01:56:21 +00:00
John McCall d041a9bf2d Add a new 'type_visibility' attribute to allow users to
control the visibility of a type for the purposes of RTTI
and template argument restrictions independently of how
visibility propagates to its non-type member declarations.

Also fix r175326 to not ignore template argument visibility
on a template explicit instantiation when a member has
an explicit attribute but the instantiation does not.

The type_visibility work is rdar://11880378

llvm-svn: 175587
2013-02-20 01:54:26 +00:00
Richard Smith 98155ad3b5 Don't repeat the function name in the comment.
llvm-svn: 175586
2013-02-20 01:17:14 +00:00
Argyrios Kyrtzidis 09c9e811de [preprocessor] Split the MacroInfo class into two separate concepts, MacroInfo class
for the data specific to a macro definition (e.g. what the tokens are), and
MacroDirective class which encapsulates the changes to the "macro namespace"
(e.g. the location where the macro name became active, the location where it was undefined, etc.)

(A MacroDirective always points to a MacroInfo object.)

Usually a macro definition (MacroInfo) is where a macro name becomes active (MacroDirective) but
splitting the concepts allows us to better model the effect of modules to the macro namespace
(also as a bonus it allows better modeling of push_macro/pop_macro #pragmas).
Modules can have their own macro history, separate from the local (current translation unit)
macro history; MacroDirectives will be used to model the macro history (changes to macro namespace).

For example, if "@import A;" imports macro FOO, there will be a new local MacroDirective created
to indicate that "FOO" became active at the import location. Module "A" itself will contain another
MacroDirective in its macro history (at the point of the definition of FOO) and both MacroDirectives
will point to the same MacroInfo object.

Introducing the separation of macro concepts is the first part towards better modeling of module macros.

llvm-svn: 175585
2013-02-20 00:54:57 +00:00
Jakub Staszak cab3dfb650 Remove unneeded #include.
llvm-svn: 175584
2013-02-20 00:32:19 +00:00
Jakub Staszak 2be3832d50 Add missing #include.
llvm-svn: 175583
2013-02-20 00:31:54 +00:00
Jordan Rose 7bfb415387 [analyzer] Account for the "interesting values" hash table resizing.
RegionStoreManager::getInterestingValues() returns a pointer to a
std::vector that lives inside a DenseMap, which is constructed on demand.
However, constructing one such value can lead to constructing another
value, which will invalidate the reference created earlier.

Fixed by delaying the new entry creation until the function returns.

llvm-svn: 175582
2013-02-20 00:27:26 +00:00
Jakub Staszak 8bc7af1a93 Fix #includes, so we include only what we really need.
llvm-svn: 175581
2013-02-20 00:26:25 +00:00
David Blaikie 77bac3dbcc Allow llvm::Optional to work with types without default constructors.
This generalizes Optional to require less from the T type by using aligned
storage for backing & placement new/deleting the T into it when necessary.

Also includes unit tests.

llvm-svn: 175580
2013-02-20 00:26:04 +00:00
Jakub Staszak 6605c604b9 Move part of APInt implementation from header to cpp file. These methods
require call cpp file anyway, so we wouldn't gain anything by keeping them
inline.

llvm-svn: 175579
2013-02-20 00:17:42 +00:00
Pedro Artigas 7ba2edc0bf clear new map and initialize new variable
llvm-svn: 175578
2013-02-20 00:10:29 +00:00
Bill Wendling 6da216f6f4 Add the function attributes from an inline asm call. These don't have declarations that set the attribute groups, so we must do it on our own.
llvm-svn: 175577
2013-02-20 00:04:41 +00:00
Chad Rosier 45a52fa097 [ms-inline asm] Force the use of a base pointer if the MachineFunction includes
MS-style inline assembly.

This is a follow-on to r175334.  Forcing a FP to be emitted doesn't ensure it
will be used.  Therefore, force the base pointer as well.  We now treat MS
inline assembly in the same way we treat functions with dynamic stack
realignment and VLAs.  This guarantees the BP will be used to reference 
parameters and locals.
rdar://13218191

llvm-svn: 175576
2013-02-19 23:50:45 +00:00
Richard Smith 4c96e99235 PR15300: Support C++11 attributes on base-specifiers. We don't support any such
attributes yet, so just issue the appropriate diagnostics. Also generalize the
fixit for attributes-in-the-wrong-place code and reuse it here, if attributes
are placed after the access-specifier or 'virtual' in a base specifier.

llvm-svn: 175575
2013-02-19 23:47:15 +00:00
Enrico Granata 9d6f7037ba Fixing a potential crasher where a synthetic value could return itself as its static value
llvm-svn: 175574
2013-02-19 23:23:41 +00:00
Jim Ingham 11b0e05490 If RunThreadPlan is called on a thread that doesn't have a selected frame, select frame 0.
<rdar://problem/13093321>

llvm-svn: 175573
2013-02-19 23:22:45 +00:00
Michael J. Spencer 2139795dfa [Driver][GNULD] Lookup .so files and default to dynamic output.
llvm-svn: 175572
2013-02-19 23:05:36 +00:00
Dan Gohman 3e1729484f Update a portability kludge to keep it in sync with changes in the code
which uses it. This is not ideal, but it ought to at least restore the
behavior to what it was before.

llvm-svn: 175571
2013-02-19 22:38:58 +00:00
Enrico Granata 4af6bf63ca <rdar://problem/13147878>
Be more user-friendly about not having scripting enabled:
a) if Python was built-out then tell people about it explicitly
b) if we are told to use none as a scripting language, then tell people about that too

This should limit the cases where the semi-cryptic error message "there is no embedded script interpreter in this mode." actually shows

llvm-svn: 175570
2013-02-19 22:34:01 +00:00
Jack Carter 10c97e5ca0 ELF symbol table field st_other support,
excluding visibility bits.

Mips (o32 abi) specific e_header setting.

EF_MIPS_ABI_O32 needs to be set in the 
ELF header flags for o32 abi output.

Contributer: Reed Kotler
llvm-svn: 175569
2013-02-19 22:29:00 +00:00
Jakub Staszak ae2fd9c97d Remove unused variable.
llvm-svn: 175568
2013-02-19 22:17:58 +00:00
Jakub Staszak 3c6583a1b1 Minor cleanups. No functionality change.
llvm-svn: 175567
2013-02-19 22:14:45 +00:00
Jack Carter 1ba1f3cec8 ELF symbol table field st_other support,
excluding visibility bits.

Mips (Mips16) specific e_header setting.

EF_MIPS_ARCH_ASE_M16 needs to be set in the 
ELF header flags for Mips16.

Contributer: Reed Kotler
llvm-svn: 175566
2013-02-19 22:14:34 +00:00
Jakub Staszak 90fbe91c58 Remove unneeded #includes.
llvm-svn: 175565
2013-02-19 22:06:38 +00:00
Jack Carter ab3cb425aa ELF symbol table field st_other support,
excluding visibility bits.

Mips (MicroMips) specific STO handling .

The st_other field settig for STO_MIPS_MICROMIPS

Contributer: Zoran Jovanovic
llvm-svn: 175564
2013-02-19 22:04:37 +00:00
Enrico Granata 4c5b3f7df6 ValueObjectSynthetic could be wrapping a ValueObjectDynamic. In that case, we want to report that the ValueObject is dynamic since synthetic values are supposed to be just their parent with different children
llvm-svn: 175563
2013-02-19 22:03:00 +00:00
Jakub Staszak 086f6cde5d Fix typos.
llvm-svn: 175562
2013-02-19 22:02:21 +00:00
Jack Carter 2f8d9d913c ELF symbol table field st_other support,
excluding visibility bits.

Generic STO handling at the Target level.

The st_other field of the ELF symbol table is one
byte in size. The first 2 bytes are used for generic
visibility and are currently handled by llvm.

The other six bits are processor specific and need 
to be set at the target level.

A couple of notes:

The new static methods for accessing and setting the "other"
flags in include/llvm/MC/MCELF.h match the style guide
and not the other methods in the file. I don't like the
inconsistency, but feel I should follow the prescribed 
lowerUpper() convention.

STO_ value definitions are not specified in gnu land as 
consistently as the STT_ and STB_ fields. Probably because
the latter were defined in a standards doc and the former
defined partially in code. I have stuck with the full byte
definition of the flags.

Contributer: Zoran Jovanovic
llvm-svn: 175561
2013-02-19 21:57:35 +00:00
Jakub Staszak e167cf5c4d Add obvious constantness.
llvm-svn: 175560
2013-02-19 21:54:59 +00:00
Jakub Staszak 5f2fb6d9d1 Simplify code. No functionality change.
llvm-svn: 175559
2013-02-19 21:49:54 +00:00
Michael J. Spencer cadb082e5a [ELF] Fix memory leak by deleting BumpPtr allocated objects.
llvm-svn: 175558
2013-02-19 21:04:30 +00:00
Jim Ingham 64ce7f4303 Make the progress bar opt in (using the -P option.)
llvm-svn: 175557
2013-02-19 20:39:27 +00:00
Jordan Rose 111aa9a28b [analyzer] Don't accidentally strip off base object regions for lazy bindings.
If a base object is at a 0 offset, RegionStoreManager may find a lazy
binding for the entire object, then try to attach a FieldRegion or
grandparent CXXBaseObjectRegion on top of that (skipping the intermediate
region). We now preserve as many layers of base object regions necessary
to make the types match.

<rdar://problem/13239840>

llvm-svn: 175556
2013-02-19 20:28:33 +00:00
Arnold Schwaighofer e4df5eb34a ARM NEON: Don't need COPY_TO_REGCLASS in pattern
In my previous commit:
"Merge a f32 bitcast of a v2i32 extractelt

A vectorized sitfp on doubles will get scalarized to a sequence of an
extract_element of <2 x i32>, a bitcast to f32 and a sitofp.
Due to the the extract_element, and the bitcast we will uneccessarily generate
moves between scalar and vector registers."

I added a pattern containing a copy_to_regclass. The copy_to_regclass is
actually not needed.

radar://13191881

llvm-svn: 175555
2013-02-19 20:16:45 +00:00