History log of /llvm-project/llvm/lib/IR/Function.cpp (Results 251 – 275 of 370)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 302b69c9 18-Oct-2016 Dehao Chen <dehao@google.com>

Use profile info to set function section prefix to group hot/cold functions.

Summary:
The original implementation is in r261607, which was reverted in r269726 to accomendate the ProfileSummaryInfo a

Use profile info to set function section prefix to group hot/cold functions.

Summary:
The original implementation is in r261607, which was reverted in r269726 to accomendate the ProfileSummaryInfo analysis pass. The new implementation:
1. add a new metadata for function section prefix
2. query against ProfileSummaryInfo in CGP to set the correct section prefix for each function
3. output the section prefix set by CGP

Reviewers: davidxl, eraman

Subscribers: vsk, llvm-commits

Differential Revision: https://reviews.llvm.org/D24989

llvm-svn: 284533

show more ...


# a53d49e1 17-Sep-2016 Mehdi Amini <mehdi.amini@apple.com>

Don't create a SymbolTable in Function when the LLVMContext discards value names (NFC)

The ValueSymbolTable is used to detect name conflict and rename
instructions automatically. This is not needed

Don't create a SymbolTable in Function when the LLVMContext discards value names (NFC)

The ValueSymbolTable is used to detect name conflict and rename
instructions automatically. This is not needed when the value
names are automatically discarded by the LLVMContext.
No functional change intended, just saving a little bit of memory.

This is a recommit of r281806 after fixing the accessor to return
a pointer instead of a reference and updating all the call-sites.

llvm-svn: 281813

show more ...


# 952ed8e3 17-Sep-2016 Mehdi Amini <mehdi.amini@apple.com>

Revert "Don't create a SymbolTable in Function when the LLVMContext discards value names (NFC)"

This reverts commit r281806. It introduces undefined behavior as an
API is returning a reference to th

Revert "Don't create a SymbolTable in Function when the LLVMContext discards value names (NFC)"

This reverts commit r281806. It introduces undefined behavior as an
API is returning a reference to the Symtab

llvm-svn: 281808

show more ...


# b877aeb7 17-Sep-2016 Mehdi Amini <mehdi.amini@apple.com>

Don't create a SymbolTable in Function when the LLVMContext discards value names (NFC)

The ValueSymbolTable is used to detect name conflict and rename
instructions automatically. This is not needed

Don't create a SymbolTable in Function when the LLVMContext discards value names (NFC)

The ValueSymbolTable is used to detect name conflict and rename
instructions automatically. This is not needed when the value
names are automatically discarded by the LLVMContext.
No functional change intended, just saving a little bit of memory.

llvm-svn: 281806

show more ...


Revision tags: llvmorg-3.9.0, llvmorg-3.9.0-rc3
# a5f8c722 22-Aug-2016 Pete Cooper <peter_cooper@apple.com>

Add comments and an assert to follow-up on r279113. NFC.

Philip commented on r279113 to ask for better comments as to
when to use the different versions of getName. Its also possible
to assert in

Add comments and an assert to follow-up on r279113. NFC.

Philip commented on r279113 to ask for better comments as to
when to use the different versions of getName. Its also possible
to assert in the simple case that we aren't an overloaded intrinsic
as those have to use the more capable version of getName.

Thanks for the comments Philip.

llvm-svn: 279466

show more ...


Revision tags: llvmorg-3.9.0-rc2
# a8db71e8 18-Aug-2016 Pete Cooper <peter_cooper@apple.com>

Add a version of Intrinsic::getName which is more efficient when there are no overloads.

When running 'opt -O2 verify-uselistorder-nodbg.lto.bc', there are 33m allocations. 8.2m
come from std::stri

Add a version of Intrinsic::getName which is more efficient when there are no overloads.

When running 'opt -O2 verify-uselistorder-nodbg.lto.bc', there are 33m allocations. 8.2m
come from std::string allocations in Intrinsic::getName(). Turns out this method only
returns a std::string because it needs to handle overloads, but that is not the common case.

This adds an overload of getName which just returns a StringRef when there are no overloads
and so saves on the allocations.

llvm-svn: 279113

show more ...


# cd1d5aaf 17-Aug-2016 Justin Bogner <mail@justinbogner.com>

Replace a few more "fall through" comments with LLVM_FALLTHROUGH

Follow up to r278902. I had missed "fall through", with a space.

llvm-svn: 278970


# 809fe6ca 09-Aug-2016 Vedant Kumar <vsk@apple.com>

[IR] Remove some unused #includes (NFC)

I needed a reader-writer lock for a downstream project and noticed that
llvm has one. Function.cpp is the only file in-tree that refers to it.
To anyone readi

[IR] Remove some unused #includes (NFC)

I needed a reader-writer lock for a downstream project and noticed that
llvm has one. Function.cpp is the only file in-tree that refers to it.
To anyone reading this: are you using RWMutex in out-of-tree code? Maybe
it's not worth keeping around any more...

Since we're not actually using RWMutex *here*, remove the #include (and
a few other stale headers while we're at it).

llvm-svn: 278178

show more ...


# c1c810de 05-Aug-2016 David Callahan <dcallahan@fb.com>

[AutoFDO] Fix handling of empty profiles

Summary:
If a profile has no samples for a function, then the function "entry count" is set to the value 0. Several places in the code test that if the Funct

[AutoFDO] Fix handling of empty profiles

Summary:
If a profile has no samples for a function, then the function "entry count" is set to the value 0. Several places in the code test that if the Function::getEntryCount is defined at all. Here we change to treat a 0 entry count the same as undefined.

In particular, this fixes a problem in getLayoutSuccessorProbThreshold in MachineBlockPlacement.cpp where we use a different and inferior heuristic for laying out basic blocks.

Reviewers: danielcdh, dnovillo

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D23082

llvm-svn: 277849

show more ...


# 6b3bd612 29-Jul-2016 Tim Northover <tnorthover@apple.com>

CodeGen: add new "intrinsic" MachineOperand kind.

This will be used during GlobalISel, where we need a more robust and readable
way to write tests than a simple immediate ID.

llvm-svn: 277209


Revision tags: llvmorg-3.9.0-rc1
# 9cbc3010 28-Jul-2016 Justin Lebar <jlebar@google.com>

Revert "Don't invoke getName() from Function::isIntrinsic().", rL276942.

This broke some out-of-tree AMDGPU tests that relied on the old behavior
wherein isIntrinsic() would return true for any func

Revert "Don't invoke getName() from Function::isIntrinsic().", rL276942.

This broke some out-of-tree AMDGPU tests that relied on the old behavior
wherein isIntrinsic() would return true for any function that starts
with "llvm.". And in general that change will not play nicely with
out-of-tree backends.

llvm-svn: 277087

show more ...


# 45bcdcbe 27-Jul-2016 Justin Lebar <jlebar@google.com>

Don't invoke getName() from Function::isIntrinsic().

Summary:
getName() involves a hashtable lookup, so is expensive given how
frequently isIntrinsic() is called. (In particular, many users cast to

Don't invoke getName() from Function::isIntrinsic().

Summary:
getName() involves a hashtable lookup, so is expensive given how
frequently isIntrinsic() is called. (In particular, many users cast to
IntrinsicInstr or one of its subclasses before calling
getIntrinsicID().)

This has an incidental functional change: Before, isIntrinsic() would
return true for any function whose name started with "llvm.", even if it
wasn't properly an intrinsic. The new behavior seems more correct to
me, because it's strange to say that isIntrinsic() is true, but
getIntrinsicId() returns "not an intrinsic".

Some callers want the old behavior -- they want to know whether the
caller is a recognized intrinsic, or might be one in some other version
of LLVM. For them, we added Function::hasLLVMReservedName(), which
checks whether the name starts with "llvm.".

This change is good for a 1.5% e2e speedup compiling a large Eigen
benchmark.

Reviewers: bogner

Subscribers: llvm-commits

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

llvm-svn: 276942

show more ...


# 92a8c611 15-Jul-2016 Justin Bogner <mail@justinbogner.com>

IR: Sort generic intrinsics before target specific ones

This splits out the intrinsic table such that generic intrinsics come
first and target specific intrinsics are grouped by target. From here
we

IR: Sort generic intrinsics before target specific ones

This splits out the intrinsic table such that generic intrinsics come
first and target specific intrinsics are grouped by target. From here
we can find out which target an intrinsic is for or differentiate
between generic and target intrinsics.

The motivation here is to make it easier to move target specific
intrinsic handling out of generic code.

llvm-svn: 275575

show more ...


# af28e7d6 26-Jun-2016 Benjamin Kramer <benny.kra@googlemail.com>

Apply clang-tidy's modernize-loop-convert to most of lib/IR.

Only minor manual fixes. No functionality change intended.

llvm-svn: 273813


# 6c7a8abf 24-Jun-2016 Artur Pilipenko <apilipenko@azulsystems.com>

Remangle intrinsics names when types are renamed

This is a resubmittion of previously reverted rL273568.

This is a fix for the problem mentioned in "LTO and intrinsics mangling" llvm-dev mail threa

Remangle intrinsics names when types are renamed

This is a resubmittion of previously reverted rL273568.

This is a fix for the problem mentioned in "LTO and intrinsics mangling" llvm-dev mail thread:
http://lists.llvm.org/pipermail/llvm-dev/2016-April/098387.html

Reviewers: mehdi_amini, reames

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

llvm-svn: 273686

show more ...


# b68b8211 24-Jun-2016 Artur Pilipenko <apilipenko@azulsystems.com>

NFC. Move verifyIntrinsicIsVarArg from verifier to Intrinsic::matchIntrinsicVarArg since it will be reused for intrinsic remangling code

llvm-svn: 273685


# a63b50af 23-Jun-2016 Hans Wennborg <hans@hanshq.net>

Revert r273568 "Remangle intrinsics names when types are renamed"

It broke 2008-07-15-Bswap.ll and 2009-09-01-PostRAProlog.ll

llvm-svn: 273574


# f0c9f813 23-Jun-2016 Artur Pilipenko <apilipenko@azulsystems.com>

Remangle intrinsics names when types are renamed

This is a fix for the problem mentioned in "LTO and intrinsics mangling" llvm-dev mail thread:
http://lists.llvm.org/pipermail/llvm-dev/2016-April/09

Remangle intrinsics names when types are renamed

This is a fix for the problem mentioned in "LTO and intrinsics mangling" llvm-dev mail thread:
http://lists.llvm.org/pipermail/llvm-dev/2016-April/098387.html

Reviewers: mehdi_amini, reames

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

llvm-svn: 273568

show more ...


# bc552275 22-Jun-2016 Artur Pilipenko <apilipenko@azulsystems.com>

NFC. Move Verifier::verifyIntrinsicType to Intrinsics.h

Move Verifier::verifyIntrinsicType to Intrinsics::matchIntrinsicsType. Will be used to accumulate overloaded types of a given intrinsic by

NFC. Move Verifier::verifyIntrinsicType to Intrinsics.h

Move Verifier::verifyIntrinsicType to Intrinsics::matchIntrinsicsType. Will be used to accumulate overloaded types of a given intrinsic by the upcoming patch to fix intrinsics names when overloaded types are renamed.

Reviewed By: reames

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

llvm-svn: 273424

show more ...


# 6100adfe 15-Jun-2016 Amaury Sechet <deadalnix@gmail.com>

Add support for string attributes in the C API.

Summary: As per title. This completes the C API Attribute support.

Reviewers: Wallbraker, whitequark, echristo, rafael, jyknight

Subscribers: mehdi_

Add support for string attributes in the C API.

Summary: As per title. This completes the C API Attribute support.

Reviewers: Wallbraker, whitequark, echristo, rafael, jyknight

Subscribers: mehdi_amini

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

llvm-svn: 272811

show more ...


# 392638d7 14-Jun-2016 Amaury Sechet <deadalnix@gmail.com>

Make sure attribute kind and attributes are named respectively Kind and Attr consistently. Historically they used to be the same the terminology is very confused in the codebase. NFC.

llvm-svn: 2727

Make sure attribute kind and attributes are named respectively Kind and Attr consistently. Historically they used to be the same the terminology is very confused in the codebase. NFC.

llvm-svn: 272704

show more ...


# 5db224e1 12-Jun-2016 Amaury Sechet <deadalnix@gmail.com>

Make sure we have a Add/Remove/Has function for various thing that can have attribute.

Summary: This also deprecated the get attribute function familly.

Reviewers: Wallbraker, whitequark, joker.eph

Make sure we have a Add/Remove/Has function for various thing that can have attribute.

Summary: This also deprecated the get attribute function familly.

Reviewers: Wallbraker, whitequark, joker.eph, echristo, rafael, jyknight

Subscribers: axw, joker.eph, llvm-commits

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

llvm-svn: 272504

show more ...


Revision tags: llvmorg-3.8.1, llvmorg-3.8.1-rc1
# cceae7fe 31-May-2016 Peter Collingbourne <peter@pcc.me.uk>

Add support for metadata attachments for global variables.

This patch adds an IR, assembly and bitcode representation for metadata
attachments for globals. Future patches will port existing features

Add support for metadata attachments for global variables.

This patch adds an IR, assembly and bitcode representation for metadata
attachments for globals. Future patches will port existing features to use
these new attachments.

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

llvm-svn: 271348

show more ...


# 728f4448 29-May-2016 Benjamin Kramer <benny.kra@googlemail.com>

Remove some 'const' specifiers that do nothing but prevent moving the argument.

Found by clang-tidy's misc-move-const-arg. While there drop some
obsolete c_str() calls.

llvm-svn: 271181


# b550cb17 18-Apr-2016 Mehdi Amini <mehdi.amini@apple.com>

[NFC] Header cleanup

Removed some unused headers, replaced some headers with forward class declarations.

Found using simple scripts like this one:
clear && ack --cpp -l '#include "llvm/ADT/IndexedM

[NFC] Header cleanup

Removed some unused headers, replaced some headers with forward class declarations.

Found using simple scripts like this one:
clear && ack --cpp -l '#include "llvm/ADT/IndexedMap.h"' | xargs grep -L 'IndexedMap[<]' | xargs grep -n --color=auto 'IndexedMap'

Patch by Eugene Kosov <claprix@yandex.ru>

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

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266595

show more ...


1...<<1112131415