Commit Graph

6743 Commits

Author SHA1 Message Date
Hemant Kulkarni
d2695ae47b [llvm-readobj] Support GNU style dyn-relocations
http://reviews.llvm.org/D18534

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264693 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-29 02:41:49 +00:00
Evgeniy Stepanov
2b6ba77f19 Remove personality for declarations in CloneModule.
Personality is copied as part of copyFunctionAttributes, but it is
invalid on a declaration. Remove the personality attribute it the
function body is not cloned.

Also add a verifier run over output modules in the llvm-split tool.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264667 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-28 21:37:02 +00:00
Adrian Prantl
8d4b7e74e1 Add an IR Verifier check for orphaned DICompileUnits.
A DICompileUnit that is not listed in llvm.dbg.cu will cause assertion
failures and/or crashes in the backend. The Verifier should reject this.

rdar://problem/25369499

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264657 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-28 21:06:26 +00:00
Hemant Kulkarni
2de577cfbd [llvm-readobj] NFC Replace case by macros for PT_* enums
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264595 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-28 17:20:23 +00:00
Hemant Kulkarni
de009ecf70 [llvm-size] Implement --common option
Differential Revision: http://reviews.llvm.org/D16820

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264591 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-28 16:48:10 +00:00
Duncan P. N. Exon Smith
a73e509bf8 Reapply ~"Bitcode: Collect all MDString records into a single blob"
Spiritually reapply commit r264409 (reverted in r264410), albeit with a
bit of a redesign.

Firstly, avoid splitting the big blob into multiple chunks of strings.

r264409 imposed an arbitrary limit to avoid a massive allocation on the
shared 'Record' SmallVector.  The bug with that commit only reproduced
when there were more than "chunk-size" strings.  A test for this would
have been useless long-term, since we're liable to adjust the chunk-size
in the future.

Thus, eliminate the motivation for chunk-ing by storing the string sizes
in the blob.  Here's the layout:

    vbr6: # of strings
    vbr6: offset-to-blob
    blob:
       [vbr6]: string lengths
       [char]: concatenated strings

Secondly, make the output of llvm-bcanalyzer readable.

I noticed when debugging r264409 that llvm-bcanalyzer was outputting a
massive blob all in one line.  Past a small number, the strings were
impossible to split in my head, and the lines were way too long.  This
version adds support in llvm-bcanalyzer for pretty-printing.

    <STRINGS abbrevid=4 op0=3 op1=9/> num-strings = 3 {
      'abc'
      'def'
      'ghi'
    }

From the original commit:

Inspired by Mehdi's similar patch, http://reviews.llvm.org/D18342, this
should (a) slightly reduce bitcode size, since there is less record
overhead, and (b) greatly improve reading speed, since blobs are super
cheap to deserialize.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264551 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-27 23:17:54 +00:00
David Blaikie
3bcdc18cae llvm-dwp: Include the dwo name (if available) when diagnosing duplicate CU IDs from dwp input files
If you're building dwps from other dwps, it can be hard to track down a
duplicate CU ID if it comes from two compilations of the same file in
different modes, etc. By including the .dwo path (which is hopefully
more unique than the file path) it can help track down where the
duplicates came from.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264520 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-26 20:32:14 +00:00
Mehdi Amini
a324948f72 Rename ModuleSummaryIndex::modPathStringEntries() into modulePaths()
It now return the map instead of an iterator.

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264489 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-26 03:35:38 +00:00
Lang Hames
3e22297684 [Object] Start threading Error through MachOObjectFile construction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264425 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-25 17:25:34 +00:00
Hemant Kulkarni
f89f7a25a7 Fix Narrowing conversion warning introduced by r264415
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264419 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-25 16:37:03 +00:00
Hemant Kulkarni
7a9b28aa44 [llvm-readobj] Impl GNU style program headers print
readelf -lW

Differential Revision: http://reviews.llvm.org/D18372

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264415 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-25 16:04:48 +00:00
Duncan P. N. Exon Smith
d49b92d802 Revert "Bitcode: Collect all MDString records into a single blob"
This reverts commit r264409 since it failed to bootstrap:
http://lab.llvm.org:8080/green/job/clang-stage2-configure-Rlto_build/8302/

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264410 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-25 15:22:27 +00:00
Duncan P. N. Exon Smith
d7084fcebd Bitcode: Collect all MDString records into a single blob
Optimize output of MDStrings in bitcode.  This emits them in big blocks
(currently 1024) in a pair of records:
  - BULK_STRING_SIZES: the sizes of the strings in the block, and
  - BULK_STRING_DATA: a single blob, which is the concatenation of all
    the strings.

Inspired by Mehdi's similar patch, http://reviews.llvm.org/D18342, this
should (a) slightly reduce bitcode size, since there is less record
overhead, and (b) greatly improve reading speed, since blobs are super
cheap to deserialize.

I needed to add support for blobs to streaming input to get the test
suite passing.
  - StreamingMemoryObject::getPointer reads ahead and returns the
    address of the blob.
  - To avoid a possible reallocation of StreamingMemoryObject::Bytes,
    BitstreamCursor::readRecord needs to move the call to JumpToEnd
    forward so that getPointer is the last bitstream operation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264409 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-25 14:40:18 +00:00
Duncan P. N. Exon Smith
f206a2c034 Bitcode: Stop using MODULE_CODE_METADATA_VALUES
The motivation for MODULE_CODE_METADATA_VALUES was to enable an
-flto=thin scheme where:

 1. First, one function is cherry-picked from a bitcode file.
 2. Later, another function is cherry-picked.
 3. Later, ...
 4. Finally, the metadata needed by all the previous functions is
    loaded.

This was abandoned in favour of:

 1. Calculate the superset of functions needed from a Module.
 2. Link all functions at once.

Delayed metadata reading no longer serves a purpose.  It also adds
a few complication, since we can't count on metadata being properly
parsed when exiting the BitcodeReader.  After discussing with Teresa, we
agreed to remove it.

The code that depended on this was removed/updated in r264326.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264378 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-25 01:29:50 +00:00
David Blaikie
dfb4013c58 llvm-dwp: Coalesce code for reading the CU's DW_AT_GNU_dwo_id and DW_AT_name
Going to be reading the DW_AT_GNU_dwo_name shortly as well, and there
was already enough duplication here that it was worth refactoring
rather than adding even more.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264350 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 22:17:08 +00:00
Mike Aizatsky
b5f62ceff2 [sancov] renaming statistics fields.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264349 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 21:49:55 +00:00
Mike Aizatsky
452d923857 [sancov] adding leading zeros to coverage pct.
Summary:
Using leading zeroes allows you to search for "000%" to find non-covered
items.

Differential Revision: http://reviews.llvm.org/D18420

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264336 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 20:41:18 +00:00
Teresa Johnson
e3c0e7f6cf [ThinLTO] Use bulk importing in llvm-link
Summary:
Use bulk importing so we can avoid the use of post-pass metadata
linking. Cloned the ModuleLazyLoaderCache from the FunctionImport pass
to facilitate this.

Reviewers: joker.eph

Subscribers: dexonsmith, llvm-commits, joker.eph

Differential Revision: http://reviews.llvm.org/D18455

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264326 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 19:52:20 +00:00
Simon Atanasyan
cc6b0d4dd4 [llvm-readobj] Decode st_other symbol's flags
The patch supports common STV_xxx visibility flags and MIPS specific
STO_MIPS_xxx flags.

Differential Revision: http://reviews.llvm.org/D18447

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264300 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 16:10:37 +00:00
James Molloy
66d1cd5130 [llvm-nm] Fix r264247
I committed the test changes successfully but managed to miss the actual code change! (lack of git -a)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264249 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 09:23:51 +00:00
Mike Aizatsky
9647ee51e2 [sancov] -print-coverage-stats option to print various coverage statistics.
Differential Revision: http://reviews.llvm.org/D18418

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264222 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 00:00:08 +00:00
Kevin Enderby
67e57feb4e Fix a cut-and-paste error in the changes for r264187 which I think is
the cause of the tools/llvm-objdump/X86/macho-symbolized-disassembly.test
crashing on linux.  Either way clearly incorrect code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264198 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-23 21:45:21 +00:00
Kevin Enderby
46e35edc2d Fix a crash in running llvm-objdump -t with an invalid Mach-O file already
in the test suite. While this is not really an interesting tool and option to run
on a Mach-O file to show the symbol table in a generic libObject format
it shouldn’t crash.

The reason for the crash was in MachOObjectFile::getSymbolType() when it was
calling MachOObjectFile::getSymbolSection() without checking its return value
for the error case.

What makes this fix require a fair bit of diffs is that the method getSymbolType() is
in the class ObjectFile defined without an ErrorOr<> so I needed to add that all
the sub classes.  And all of the uses needed to be updated and the return value
needed to be checked for the error case.

The MachOObjectFile version of getSymbolType() “can” get an error in trying to
come up with the libObject’s internal SymbolRef::Type when the Mach-O symbol
symbol type is an N_SECT type because the code is trying to select from the
SymbolRef::ST_Data or SymbolRef::ST_Function values for the SymbolRef::Type.
And it needs the Mach-O section to use isData() and isBSS to determine if
it will return SymbolRef::ST_Data.

One other possible fix I considered is to simply return SymbolRef::ST_Other
when MachOObjectFile::getSymbolSection() returned an error.  But since in
the past when I did such changes that “ate an error in the libObject code” I
was asked instead to push the error out of the libObject code I chose not
to implement the fix this way.

As currently written both the COFF and ELF versions of getSymbolType()
can’t get an error.  But if isReservedSectionNumber() wanted to check for
the two known negative values rather than allowing all negative values or
the code wanted to add the same check as in getSymbolAddress() to use
getSection() and check for the error then these versions of getSymbolType()
could return errors.

At the end of the day the error printed now is the generic “Invalid data was
encountered while parsing the file” for object_error::parse_failed.  In the
future when we thread Lang’s new TypedError for recoverable error handling
though libObject this will improve.  And where the added // Diagnostic(…
comment is, it would be changed to produce and error message
like “bad section index (42) for symbol at index 8” for this case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264187 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-23 20:27:00 +00:00
Justin Bogner
6d476e60b2 MC: Don't access the filesystem in MCContext's constructor
MCContext shouldn't be accessing the filesystem - that's a gross
layering violation and makes it awkward to use as a library or in a
daemon where it may not even be allowed filesystem access.

The CWD lookup here is normally redundant anyway, since the calling
context either also looks up the CWD or sets this to something more
specific. Here, we fix up the one caller that doesn't already set up a
debug compilation dir and make it clear that the responsibility for
such set up is in the users of MCContext.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264109 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-22 22:24:29 +00:00
Rafael Espindola
05601d5da5 Revert "[llvm-objdump] Printing relocations in executable and shared object files. This partially reverts r215844 by removing test objdump-reloc-shared.test which stated GNU objdump doesn't print relocations, it does."
This reverts commit r263971.
It produces the wrong results for .rela.dyn. I will add a test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263987 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-21 20:59:15 +00:00
Colin LeMahieu
bb93856810 [llvm-objdump] Printing relocations in executable and shared object files. This partially reverts r215844 by removing test objdump-reloc-shared.test which stated GNU objdump doesn't print relocations, it does.
In executable and shared object ELF files, relocations in the file contain the final virtual address rather than section offset so this is adjusted to display section offset.

Differential revision: http://reviews.llvm.org/D15965

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263971 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-21 19:14:50 +00:00
Hemant Kulkarni
962167f0e2 [llvm-readobj] Impl GNU style symbols printing
Implements "readelf -sW and readelf -DsW"

Differential Revision: http://reviews.llvm.org/D18224

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263952 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-21 17:18:23 +00:00
Davide Italiano
443693f33a [gold] Emit a diagnostic in case we fail to remove a file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263914 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-20 20:12:33 +00:00
Mehdi Amini
e6cda0e9bc Expose IRBuilder::CreateAtomicCmpXchg as LLVMBuildAtomicCmpXchg in the C API.
Summary: Also expose getters and setters in the C API, so that the change can be tested.

Reviewers: nhaehnle, axw, joker.eph

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D18260

From: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263886 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-19 21:28:28 +00:00
Mehdi Amini
14e4632794 Const-correctness in libLTO
Looks like I was sloppy when bridging to C.
Thanks D. Blaikie for noticing!

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263885 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-19 21:28:18 +00:00
Mehdi Amini
4392249e77 Add a dependency from llvm-link to TransformUtils following r263860
From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263873 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-19 03:12:54 +00:00
Davide Italiano
fef7414d58 [gold] Use early return to simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263872 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-19 02:34:33 +00:00
Mehdi Amini
8ff9043ade Fix a const_cast related warning in GCC in the C API for libLTO
From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263870 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-19 01:24:23 +00:00
Mehdi Amini
8268477130 Rework linkInModule(), making it oblivious to ThinLTO
Summary:
ThinLTO is relying on linkInModule to import selected function.
However a lot of "magic" was hidden in linkInModule and the IRMover,
who would rename and promote global variables on the fly.

This is moving to an approach where the steps are decoupled and the
client is reponsible to specify the list of globals to import.
As a consequence some test are changed because they were relying on
the previous behavior which was importing the definition of *every*
single global without control on the client side.
Now the burden is on the client to decide if a global has to be imported
or not.

Reviewers: tejohnson

Subscribers: joker.eph, llvm-commits

Differential Revision: http://reviews.llvm.org/D18122

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263863 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-19 00:40:31 +00:00
Mehdi Amini
e314781f09 Add a test for r263577: "Add missing error handling in llvm-lto"
On Rafael's suggestion!
(also fix a discrepancy between this error message format and the others)

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263860 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-19 00:17:32 +00:00
Mike Aizatsky
a87dfbab4c [sancov] typo fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263849 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-18 22:46:10 +00:00
Mike Aizatsky
e3eb88f3f7 [sancov] reformat & 1 clang-tidy warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263846 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-18 22:40:52 +00:00
David Majnemer
cb980bd3e2 [obj2yaml, COFF] Assert that the alignment is not bogus
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263839 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-18 21:51:14 +00:00
Colin LeMahieu
1661683468 [llvm-objdump] Print <unknown> in place of instruction text if it couldn't be disassembled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263793 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-18 16:26:48 +00:00
Pete Cooper
e0d559e020 Always cache resolved paths as it even saves on StringMap lookups.
Now that the resolved path cache stores the StringRef's, its
best to just always cache the results, even when realpath isn't
used.  This way we'll still avoid the StringMap hashing and lookup.

This also conveniently reorganises this code in a way I need for
a future patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263777 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-18 05:04:04 +00:00
Pete Cooper
3175d6f980 Use StringRef's in resolved path cache to avoid extra internString lookups. NFC.
ResolvedPaths was storing std::string's as a cache. We would then take those strings and look them up in the internString pool to get a unique StringRef for each path.

This patch changes ResolvedPaths to store the StringRef pointing in to the internString pool itself. This way, when getResolvedPath returns a string, we know we have the StringRef we would find in the pool anyway. We can avoid the duplicate memory of the std::string's, and also the time from the lookup.

Unfortunately my profiles show no runtime change here, but it should still save memory allocations which is nice.

Reviewed by Frederic Riss.

Differential Revision: http://reviews.llvm.org/D18259

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263774 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-18 03:48:09 +00:00
Mike Aizatsky
d615f87316 [sancov] html report: replacing uncovered functions with function coverage % table.
Differential Revision: http://reviews.llvm.org/D18256

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263767 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-18 00:12:14 +00:00
Simon Atanasyan
bfc21a3426 [llvm-objdump] Add '0x' prefix to a target displacement number to accent its hex format
It might be hard to recognize a hexadecimal number without '0x' prefix.
Besides that '0x' prefix corresponds to GNU objdump behaviour.

Differential Revision: http://reviews.llvm.org/D18207

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263705 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-17 10:43:44 +00:00
David Majnemer
ba0d0e1663 [yaml2obj, COFF] Correctly handle section alignment
The section alignment field was marked optional but not provided a
default value: initialize it with 0.

While we are here, ensure that the section alignment is plausible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263692 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-17 05:43:26 +00:00
Justin Bogner
a935ab16cf llvm-bcanalyzer: Fix handling of attribute group entries
These were printing as "UnknownCode3", since we were looking for them
inside PARAMATTR blocks instead of PARAMATTR_GROUP blocks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263597 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-15 22:37:25 +00:00
Mehdi Amini
3e2997601d Add missing error handling in llvm-lto
Annoyingly, ErrorOr allows to *not check* the error when things go
well. It will crash badly when there is an error though. It should
runtime assert when it is used without being checked!

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263577 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-15 20:17:55 +00:00
Hemant Kulkarni
a7904d39a8 [llvm-readobj] Impl GNU style printing of sections and relocations
Differential Revision: http://reviews.llvm.org/D17523

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263561 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-15 17:25:31 +00:00
David Majnemer
c5335482cf [llvm-objdump] Add support for dumping the PE TLS directory
The PE TLS directory contains information about where the TLS data
resides in the image, what functions should be executed when threads are
created, etc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263537 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-15 06:14:01 +00:00
Lang Hames
875b7560fb [MachO] Add MachO alt-entry directive support.
This patch adds support for the MachO .alt_entry assembly directive, and uses
it for global aliases with non-zero GEP offsets. The alt_entry flag indicates
that a symbol should be layed out immediately after the preceding symbol.
Conceptually it introduces an alternate entry point for a function or data
structure. E.g.:

safe_foo:
  // check preconditions for foo
.alt_entry fast_foo
fast_foo:
  // body of foo, can assume preconditions.

The .alt_entry flag is also implicitly set on assembly aliases of the form:

a = b + C

where C is a non-zero constant, since these have the same effect as an
alt_entry symbol: they introduce a label that cannot be moved relative to the
preceding one. Setting the alt_entry flag on aliases of this form fixes
http://llvm.org/PR25381.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263521 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-15 01:43:05 +00:00
Teresa Johnson
f2403fe5b5 [ThinLTO] Renaming of function index to module summary index (NFC)
(Resubmitting after fixing missing file issue)

With the changes in r263275, there are now more than just functions in
the summary. Completed the renaming of data structures (started in
r263275) to reflect the wider scope. In particular, changed the
FunctionIndex* data structures to ModuleIndex*, and renamed related
variables and comments. Also renamed the files to reflect the changes.

A companion clang patch will immediately succeed this patch to reflect
this renaming.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263513 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-15 00:04:37 +00:00