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

17717 Commits

Author SHA1 Message Date
Reed Kotler
6f984e6349 Add some additonal attribute helper functions. Test will be on follow
up putback to clang for mips16.

llvm-svn: 176968
2013-03-13 20:20:08 +00:00
David Blaikie
3c701e7671 Refactor filename/directory in DICompileUnit into a DIFile
This is the next step towards making the metadata for DIScopes have a common
prefix rather than having to delegate based on their tag type.

llvm-svn: 176913
2013-03-13 00:01:35 +00:00
David Blaikie
98d9ccffb8 Remove unused "isMain" field from DICompileUnit
llvm-svn: 176910
2013-03-12 22:43:04 +00:00
Manman Ren
a557c34a03 Debug Info: use SmallVector instead of std::vector in MCDwarfDirsCUMap and MCDwarfFilesCUMap
llvm-svn: 176893
2013-03-12 20:17:00 +00:00
Pete Cooper
7a5199df98 Add a doFinalization method to the DataLayout pass.
This pass is meant to be immutable, however it holds mutable state to cache StructLayouts.
This method will allow the pass manager to clear the mutable state between runs.

Note that unfortunately it is still necessary to have the destructor, even though it does the
same thing as doFinalization.  This is because most TargetMachines embed a DataLayout on which
doFinalization isn't run as its never added to the pass manager.

I also didn't think it was necessary to complication things with a deInit method for which
doFinalization and ~DataLayout both call as there's only one field of mutable state.  If we had
more fields to finalize i'd have added this.

llvm-svn: 176877
2013-03-12 17:37:31 +00:00
David Blaikie
cae22d7ca6 Remove support for versioned debug info.
Versioned debug info support has been a burden to maintain & also compromised
current debug info verification by causing test cases testing old debug info to
remain rather than being updated to the latest. It also makes it hard to add or
change the metadata schema by requiring various backwards-compatibility in the
DI* hierarchy.

So it's being removed in preparation for new changes to the schema to tidy up
old/unnecessary fields and add new fields needed for new debug info (well, new
to LLVM at least).

The more surprising part of this is the changes to DI*::Verify - this became
necessary due to the changes to AsmWriter. AsmWriter was relying on the version
test to decide which bits of metadata were actually debug info when printing
the comment annotations. Without the version information the tag numbers were
too common & it would print debug info on random metadata that happened to
start with an integer that matched a tag number. Instead this change makes the
Verify functions more precise (just adding "number of operands" checks - not
type checking those operands yet) & relies on that to decide which metadata is
debug info metadata.

llvm-svn: 176838
2013-03-11 23:39:23 +00:00
Eli Bendersky
af06ec5c87 Residual cleanup: live-out set is gone
llvm-svn: 176836
2013-03-11 23:18:25 +00:00
Nick Lewycky
d19f3cb20c Use LLVMBool instead of 'bool' in the C API. Based on a patch by Peter Zotov!
llvm-svn: 176793
2013-03-10 21:58:22 +00:00
Jakub Staszak
0e54bb7776 Cleanup #includes.
llvm-svn: 176787
2013-03-10 13:11:23 +00:00
Jakub Staszak
0b623a938e Remove unneeded #include.
llvm-svn: 176785
2013-03-10 01:15:14 +00:00
Jakub Staszak
136a76be1d Add some constantness in MachinePostDominators.h.
llvm-svn: 176784
2013-03-10 01:14:42 +00:00
Jakub Staszak
d892e32145 Remove unneeded #includes. Use forward declarations instead.
llvm-svn: 176783
2013-03-10 00:34:01 +00:00
Jakub Staszak
5cf87a4126 Remove unneeded #includes. Use forward declarations instead.
llvm-svn: 176782
2013-03-10 00:20:16 +00:00
Jakub Staszak
7f628143da Remove unneeded cast.
llvm-svn: 176776
2013-03-09 19:34:14 +00:00
Jakub Staszak
b50ddc977c Remove unneeded const_cast.
llvm-svn: 176771
2013-03-09 18:24:26 +00:00
Jakub Staszak
174aed37d3 Use forward declaration instead of #include.
llvm-svn: 176770
2013-03-09 18:05:34 +00:00
Jan Wen Voung
2346df4d41 Disable statistics on Release builds and move tests that depend on -stats.
Summary:
Statistics are still available in Release+Asserts (any +Asserts builds),
and stats can also be turned on with LLVM_ENABLE_STATS.

Move some of the FastISel stats that were moved under DEBUG()
back out of DEBUG(), since stats are disabled across the board now.

Many tests depend on grepping "-stats" output.  Move those into
a orig_dir/Stats/. so that they can be marked as unsupported
when building without statistics.

Differential Revision: http://llvm-reviews.chandlerc.com/D486

llvm-svn: 176733
2013-03-08 22:56:31 +00:00
Eli Bendersky
4eda53eceb Clean up out-of-date comments and some stray whitespace
llvm-svn: 176729
2013-03-08 22:29:44 +00:00
Jakob Stoklund Olesen
896cede5d3 No really, don't use end().
Clearly, this function is never actually called with the last
instruction in the function.

llvm-svn: 176708
2013-03-08 18:36:36 +00:00
David Blaikie
2d9edabe41 Remove -print-dbginfo as it is unused & bitrotten.
This pass hasn't been touched in two years & would fail with assertions against
the current debug info metadata format (the only test case for it still uses a
many-versions old debug info metadata format)

llvm-svn: 176707
2013-03-08 18:17:46 +00:00
Jakob Stoklund Olesen
504736022a Avoid creating a SlotIndex from the end() iterator.
No test case, spotted by inspection.

llvm-svn: 176705
2013-03-08 18:08:54 +00:00
Jakob Stoklund Olesen
b83588cd0b Rename isEarlierInSameTrace to isUsefulDominator.
In very rare cases caused by irreducible control flow, the dominating
block can have the same trace head without actually being part of the
trace.

As long as such a dominator still has valid instruction depths, it is OK
to use it for computing instruction depths.

Rename the function to avoid lying, and add a check that instruction
depths are computed for the dominator.

llvm-svn: 176668
2013-03-07 23:55:49 +00:00
Benjamin Kramer
2d44bd7bc4 Fix tautological compare. Not sure why this didn't trigger any test failures.
llvm-svn: 176652
2013-03-07 20:56:18 +00:00
Benjamin Kramer
bc0e70c415 ArrayRefize some code. No functionality change.
llvm-svn: 176648
2013-03-07 20:33:29 +00:00
Jakub Staszak
d62f609790 Change Index type from unsigned long to unsigned. This should fix PR14980.
llvm-svn: 176645
2013-03-07 20:21:27 +00:00
Jakub Staszak
9f20ea9a91 Remove trailing spaces.
llvm-svn: 176643
2013-03-07 20:04:17 +00:00
Nick Lewycky
360f8f1e37 Switch from a version 4.2/4.4 switch to a four-byte version string to be put
into the actual gcov file.

Instead of using the bottom 4 bytes as the function identifier, use a counter.
This makes the identifier numbers stable across multiple runs.

llvm-svn: 176616
2013-03-07 08:28:49 +00:00
Manman Ren
4287c8ee15 Debug Info: store the files and directories for each compile unit.
We now emit a line table for each compile unit. To reduce the prologue size
of each line table, the files and directories used by each compile unit are
stored in std::map<unsigned, std::vector< > > instead of std::vector< >.

The prologue for a lto'ed image can be as big as 93K. Duplicating 93K for each
compile unit causes a huge increase of debug info. With this patch, each
prologue will only emit the files required by the compile unit.

rdar://problem/13342023

llvm-svn: 176605
2013-03-07 01:42:00 +00:00
Andrew Trick
55af24b5b9 Generalize my previous fix for -print-options.
Always print options that differ from their implicit default. At least
for simple option types.

llvm-svn: 176572
2013-03-06 19:04:56 +00:00
Shuxin Yang
048b100cc5 Memory Dependence Analysis (not mem-dep test) take advantage of "invariant.load" metadata.
The "invariant.load" metadata indicates the memory unit being accessed is immutable.
A load annotated with this metadata can be moved across any store.

As I am not sure if it is legal to move such loads across barrier/fence, this
change dose not allow such transformation.

rdar://11311484

Thank Arnold for code review.

llvm-svn: 176562
2013-03-06 17:48:48 +00:00
Jakub Staszak
0096b95782 Remove duplicated forward declaration.
llvm-svn: 176536
2013-03-06 00:04:32 +00:00
Jakub Staszak
447ad62761 Fix a few typos in comments.
llvm-svn: 176519
2013-03-05 22:05:16 +00:00
Jakub Staszak
b91905feba Add some constantness.
llvm-svn: 176518
2013-03-05 22:01:15 +00:00
Jakub Staszak
7354768c56 std::distance() == 0 means that iterators are equal. No functionality change.
llvm-svn: 176516
2013-03-05 21:53:57 +00:00
Meador Inge
509bee9bf5 Add more functions to the TLI.
This patch adds many more functions to the target library information.
All of the functions being added were discovered while doing the migration
of the simplify-libcalls attribute annotation functionality to the
functionattrs pass.  As a part of that work the attribute annotation logic
will query TLI to determine if a function should be annotated or not.

Signed-off-by: Meador Inge <meadori@codesourcery.com>
llvm-svn: 176514
2013-03-05 21:47:40 +00:00
Arnold Schwaighofer
7d23f90858 Use the right number of slashes in comment string
llvm-svn: 176504
2013-03-05 19:04:12 +00:00
Arnold Schwaighofer
7475aaf23e Clarify comment for function getObjectSize
Clarify that we mean the object starting at the pointer to the end of the
underlying object and not the size of the whole allocated object.

llvm-svn: 176491
2013-03-05 16:53:24 +00:00
Nuno Lopes
fc752c7658 recommit r172363 & r171325 (reverted in r172756)
This adds minimalistic support for PHI nodes to llvm.objectsize() evaluation

fingers crossed so that it does break clang boostrap again..

llvm-svn: 176408
2013-03-02 11:36:24 +00:00
Nuno Lopes
a2fd2b65d3 add getUnderlyingObjectSize()
this is similar to getObjectSize(), but doesnt subtract the offset
tweak the BasicAA code accordingly (per PR14988)

llvm-svn: 176407
2013-03-02 11:23:34 +00:00
Peter Collingbourne
8b72c382d6 Modify {Call,Invoke}Inst::addAttribute to take an AttrKind.
llvm-svn: 176397
2013-03-02 01:20:18 +00:00
Michael Ilseman
6bd55f4125 Cache the result of Function::getIntrinsicID() in a DenseMap attached to the LLVMContext.
This reduces the time actually spent doing string to ID conversion and shows a 10% improvement in compile time for a particularly bad case that involves ARM Neon intrinsics (these have many overloads).

Patch by Jean-Luc Duprat!

llvm-svn: 176365
2013-03-01 18:48:54 +00:00
Michael Liao
1e621fbd2f Fix PR10475
- ISD::SHL/SRL/SRA must have either both scalar or both vector operands
  but TLI.getShiftAmountTy() so far only return scalar type. As a
  result, backend logic assuming that breaks.
- Rename the original TLI.getShiftAmountTy() to
  TLI.getScalarShiftAmountTy() and re-define TLI.getShiftAmountTy() to
  return target-specificed scalar type or the same vector type as the
  1st operand.
- Fix most TICG logic assuming TLI.getShiftAmountTy() a simple scalar
  type.

llvm-svn: 176364
2013-03-01 18:40:30 +00:00
Peng Cheng
7600fc5ab4 test commit to use consistent comment notation.
llvm-svn: 176353
2013-03-01 16:49:35 +00:00
Yiannis Tsiouris
a8c63cc242 GCInfoDeleter code cleanup after r175528
Remove GCInfoDeleter from passes and comments.

llvm-svn: 176347
2013-03-01 11:40:32 +00:00
Michael Liao
1bdc8d8a6c Minor coding style fix
llvm-svn: 176334
2013-03-01 04:19:34 +00:00
Andrew Trick
e602ffc5f9 Fix incorrect ScheduleDAG comment and formalize Weak edges.
llvm-svn: 176315
2013-03-01 00:19:12 +00:00
Eli Bendersky
db301bc237 A small refactoring + adding comments.
SelectionDAGIsel::LowerArguments needs a function, not a basic block. So it
makes sense to pass it the function instead of extracting a basic-block from
the function and then tossing it. This is also more self-documenting (functions
have arguments, BBs don't).

In addition, added comments to a couple of Select* methods.

llvm-svn: 176305
2013-02-28 23:09:18 +00:00
Michael J. Spencer
55347a0780 [Support][ErrorOr] Add support for implicit conversion from error code/condition enums.
llvm-svn: 176228
2013-02-28 01:44:26 +00:00
David Blaikie
c9c5b0154d Copy missing member in DataLayout copy ctor.
Test case is missing due to it not being reachable through the current tools
but out of tree code such as the sample at
http://llvm.org/docs/tutorial/LangImpl4.html

Patch by Peng Cheng <gm4cheng@gmail.com>

llvm-svn: 176213
2013-02-27 21:44:59 +00:00
Michael Ilseman
07517409f1 Reverted: r176136 - Have a way for a target to opt-out of target-independent fast isel
llvm-svn: 176204
2013-02-27 19:54:00 +00:00
Aaron Ballman
0092472446 Switching -1ULL to UINT64_MAX to fix MSVC warnings. Patch thanks to Peng Cheng!
llvm-svn: 176197
2013-02-27 18:38:33 +00:00
Aaron Ballman
4366a1d53f Suppressing MSVC warnings; patch thanks to Peng Cheng!
llvm-svn: 176193
2013-02-27 18:25:41 +00:00
Nick Lewycky
7f68cef53a In GCC 4.7, function names are now forbidden from .gcda files. Support this by
passing a null pointer to the function name in to GCDAProfiling, and add another
switch onto GCOVProfiling.

llvm-svn: 176173
2013-02-27 06:22:56 +00:00
Pedro Artigas
149b81ab7e Enhance integer division emulation support to handle types smaller than 32 bits,
enhancement done the trivial way; by extending inputs and truncating outputs 
which is addequate for targets with little or no support for integer arithmetic
on integer types less than 32 bits.

llvm-svn: 176139
2013-02-26 23:33:20 +00:00
Michael Ilseman
84760d376c Have a way for a target to opt-out of target-independent fast isel
llvm-svn: 176136
2013-02-26 23:15:23 +00:00
Matt Arsenault
3191e0a8cb Another test commit. Remove trailing whitespace.
llvm-svn: 176113
2013-02-26 19:33:48 +00:00
Matt Arsenault
55d66600ee Test commit. Remove trailing whitespace.
llvm-svn: 176111
2013-02-26 19:18:06 +00:00
Eli Bendersky
2304bd37b7 Slight cosmetic fixes
llvm-svn: 176107
2013-02-26 18:05:31 +00:00
Kostya Serebryany
f560b78692 Unify clang/llvm attributes for asan/tsan/msan (LLVM part)
These are two related changes (one in llvm, one in clang).
LLVM: 
- rename address_safety => sanitize_address (the enum value is the same, so we preserve binary compatibility with old bitcode)
- rename thread_safety => sanitize_thread
- rename no_uninitialized_checks -> sanitize_memory

CLANG: 
- add __attribute__((no_sanitize_address)) as a synonym for __attribute__((no_address_safety_analysis))
- add __attribute__((no_sanitize_thread))
- add __attribute__((no_sanitize_memory))

for S in address thread memory
If -fsanitize=S is present and __attribute__((no_sanitize_S)) is not
set llvm attribute sanitize_S

llvm-svn: 176075
2013-02-26 06:58:09 +00:00
Michael Ilseman
46cd4a307a Use a DenseMap instead of a std::map for AnalysisID -> Pass* maps. This reduces the pass-manager overhead from FPPassManager::runOnFunction() by about 10%.
llvm-svn: 176072
2013-02-26 01:31:59 +00:00
Bill Schmidt
a7e4a58051 Fix missing relocation for TLS addressing peephole optimization.
Report and fix due to Kai Nacke.  Testcase update by me.

llvm-svn: 176029
2013-02-25 16:44:35 +00:00
David Blaikie
31258c581d DIBuilder: support structs with vtable pointers in the same way as classes
llvm-svn: 176004
2013-02-25 01:07:18 +00:00
Eric Christopher
fb90604970 Add a field to the compile unit of where we plan on splitting out
the debug info for -gsplit-dwarf so we can encode that location
in the skeleton cu.

llvm-svn: 175933
2013-02-22 23:50:04 +00:00
Eric Christopher
446940d29d Add a TODO and explain when we can get rid of the isMain field.
llvm-svn: 175932
2013-02-22 23:50:01 +00:00
Eric Christopher
f2a0fcd3e3 Formatting.
llvm-svn: 175931
2013-02-22 23:49:58 +00:00
Benjamin Kramer
941a16e288 An Optional<T> is pod-like if the inner type is.
llvm-svn: 175908
2013-02-22 18:58:26 +00:00
Bill Wendling
eecb534c87 Implement the NoBuiltin attribute.
The 'nobuiltin' attribute is applied to call sites to indicate that LLVM should
not treat the callee function as a built-in function. I.e., it shouldn't try to
replace that function with different code.

llvm-svn: 175835
2013-02-22 00:12:35 +00:00
David Blaikie
fb0bcc1539 Limit cast machinery to preserve const and not accept temporaries
After cleaning up the following type hierarchies:
  * TypeLoc: r175462
  * SVal: r175594
  * CFGElement: r175462
  * ProgramPoint: r175812
that all invoked undefined behavior by causing a derived copy construction of a
base object through an invalid cast (thus supporting code that relied on
casting temporaries that were direct base objects) Clang/LLVM is now clean of
casts of temporaries. So here's some fun SFINAE machinery (courtesy of Eli
Friedman, with some porting back from C++11 to LLVM's traits by me) to cause
compile-time failures if llvm::cast & friends are ever passed an rvalue.

This should avoid a repeat of anything even remotely like PR14321/r168124.

Thanks to Jordan Rose for the help with the various Static Analyzer related
hierarchies that needed cleaning up, Eli for the SFINAE, Richard Smith, John
McCall, Ted Kremenek, and Anna Zaks for their input/reviews/patience along the
way.

llvm-svn: 175819
2013-02-21 22:48:34 +00:00
Pedro Artigas
c2a923e628 Clear the whole table including the tombstones, since the tombstone count will
be set to zero that is what it was intended. Should improve performance of 
the data structure when clear is invoked frequently (both compile time and
memory usage).

llvm-svn: 175799
2013-02-21 21:32:00 +00:00
Eli Bendersky
37f247b8d8 Move the eliminateCallFramePseudoInstr method from TargetRegisterInfo
to TargetFrameLowering, where it belongs. Incidentally, this allows us
to delete some duplicated (and slightly different!) code in TRI.

There are potentially other layering problems that can be cleaned up
as a result, or in a similar manner.

The refactoring was OK'd by Anton Korobeynikov on llvmdev.

Note: this touches the target interfaces, so out-of-tree targets may
be affected.

llvm-svn: 175788
2013-02-21 20:05:00 +00:00
Jakob Stoklund Olesen
38b12c2ce2 Make RAFast::UsedInInstr indexed by register units.
This fixes some problems with too conservative checking where we were
marking all aliases of a register as used, and then also checking all
aliases when allocating a register.

<rdar://problem/13249625>

llvm-svn: 175782
2013-02-21 19:35:21 +00:00
David Blaikie
117a44bd1a Add move ctor/assignment to Optional<T>
Code review feedback for r175580 by Jordan Rose.

llvm-svn: 175729
2013-02-21 07:55:39 +00:00
David Blaikie
2e8e3f41e9 Correct spelling of 'enumerator'.
Post commit code review feedback to r175705 from Jordan Rose.

llvm-svn: 175724
2013-02-21 06:08:22 +00:00
David Blaikie
6739305653 Make Optional<T>'s operator bool 'explicit' in C++11
Provides a general way to add 'explicit' for conversion operators (a no-op when
compiling as C++98).

llvm-svn: 175723
2013-02-21 06:05:57 +00:00
NAKAMURA Takumi
398640076e ADT/Optional.h: Appease msvc. It reapplies r175626.
llvm-svn: 175710
2013-02-21 02:32:25 +00:00
David Blaikie
7c7579badf Provide a "None" value for convenience when using Optional<T>()
This implementation of NoneType/None does have some holes but I haven't
found one that doesn't - open to improvement.

llvm-svn: 175696
2013-02-21 00:27:28 +00:00
Jim Grosbach
89c0252c2a MCParser: Update method names per coding guidelines.
s/AddDirectiveHandler/addDirectiveHandler/
s/ParseMSInlineAsm/parseMSInlineAsm/
s/ParseIdentifier/parseIdentifier/
s/ParseStringToEndOfStatement/parseStringToEndOfStatement/
s/ParseEscapedString/parseEscapedString/
s/EatToEndOfStatement/eatToEndOfStatement/
s/ParseExpression/parseExpression/
s/ParseParenExpression/parseParenExpression/
s/ParseAbsoluteExpression/parseAbsoluteExpression/
s/CheckForValidSection/checkForValidSection/

http://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly

No functional change intended.

llvm-svn: 175675
2013-02-20 22:21:35 +00:00
Jim Grosbach
233487d8a2 Update TargetLowering ivars for name policy.
http://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly

ivars should be camel-case and start with an upper-case letter. A few in
TargetLowering were starting with a lower-case letter.

No functional change intended.

llvm-svn: 175667
2013-02-20 21:13:59 +00:00
Jakob Stoklund Olesen
d9c02e642d Use LiveRangeUpdater instead of mergeIntervalRanges.
Performance is the same, but LiveRangeUpdater has a more flexible
interface.

llvm-svn: 175645
2013-02-20 18:18:15 +00:00
Jakob Stoklund Olesen
04595984ee Add a LiveRangeUpdater class.
Adding new segments to large LiveIntervals can be expensive because the
LiveRange objects after the insertion point may need to be moved left or
right. This can cause quadratic behavior when adding a large number of
segments to a live range.

The LiveRangeUpdater class allows the LIveInterval to be in a temporary
invalid state while segments are being added. It maintains an internal
gap in the LiveInterval when it is shrinking, and it has a spill area
for new segments when the LiveInterval is growing.

The behavior is similar to the existing mergeIntervalRanges() function,
except it allocates less memory for the spill area, and the algorithm is
turned inside out so the loop is driven by the clients.

llvm-svn: 175644
2013-02-20 18:18:12 +00:00
Jakob Stoklund Olesen
acad8e27bd Add a default constructor for LiveRange.
It is useful to be able to create temporary LiveRange object whose
members are filled in later.

llvm-svn: 175639
2013-02-20 17:46:51 +00:00
NAKAMURA Takumi
70d86d9cce Revert r175626, "ADT/Optional.h: Appease msvc."
Sorry, I didn't cover +Asserts, by accident. :(

llvm-svn: 175633
2013-02-20 15:52:44 +00:00
NAKAMURA Takumi
90a8a0605d Whitespace.
llvm-svn: 175627
2013-02-20 15:12:32 +00:00
NAKAMURA Takumi
db16fe6b25 ADT/Optional.h: Appease msvc.
llvm-svn: 175626
2013-02-20 15:12:24 +00:00
Benjamin Kramer
a2f37d8d3b Move the SplatByte helper to APInt and generalize it a bit.
llvm-svn: 175621
2013-02-20 13:00:06 +00:00
Cameron Zwarich
383c7bb537 Modify LiveInterval::addRange() to match the comment about what it returns.
llvm-svn: 175602
2013-02-20 06:46:44 +00:00
Cameron Zwarich
014e7a4631 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
fedf4a2442 Make SlotIndex::getEntry() return unsigned to match IndexListEntry.
llvm-svn: 175600
2013-02-20 06:46:39 +00:00
Cameron Zwarich
277fc532b7 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
David Blaikie
05260669b1 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
Michael J. Spencer
6270bca74a [llvm-readobj] Add ELF .dynamic table dumping.
llvm-svn: 175592
2013-02-20 02:37:12 +00:00
Jakub Staszak
fa42b5d77d Remove unneeded #include.
llvm-svn: 175584
2013-02-20 00:32:19 +00:00
Jakub Staszak
145f80a35b Fix #includes, so we include only what we really need.
llvm-svn: 175581
2013-02-20 00:26:25 +00:00
David Blaikie
cbe2e7eb6b 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
c4692feb81 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
Jack Carter
ecca606341 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
Jack Carter
9b85d941b3 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
Jack Carter
3c286a1400 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
Jack Carter
c2996594d9 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
ec606942d2 Simplify code. No functionality change.
llvm-svn: 175559
2013-02-19 21:49:54 +00:00