History log of /llvm-project/llvm/unittests/IR/IRBuilderTest.cpp (Results 101 – 124 of 124)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 7fddeccb 17-Jun-2015 David Majnemer <david.majnemer@gmail.com>

Move the personality function from LandingPadInst to Function

The personality routine currently lives in the LandingPadInst.

This isn't desirable because:
- All LandingPadInsts in the same function

Move the personality function from LandingPadInst to Function

The personality routine currently lives in the LandingPadInst.

This isn't desirable because:
- All LandingPadInsts in the same function must have the same
personality routine. This means that each LandingPadInst beyond the
first has an operand which produces no additional information.

- There is ongoing work to introduce EH IR constructs other than
LandingPadInst. Moving the personality routine off of any one
particular Instruction and onto the parent function seems a lot better
than have N different places a personality function can sneak onto an
exceptional function.

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

llvm-svn: 239940

show more ...


Revision tags: llvmorg-3.6.1, llvmorg-3.6.1-rc1
# 0c2ab37b 30-Apr-2015 Pawel Bylica <chfast@gmail.com>

Add convenient overloads for CreateInsertElement and CreateExtractElement methods in IRBuilder

Summary:
This pathc add convenient overloads for CreateInsertElement and CreateExtractElement methods i

Add convenient overloads for CreateInsertElement and CreateExtractElement methods in IRBuilder

Summary:
This pathc add convenient overloads for CreateInsertElement and CreateExtractElement methods in IRBuilder
where vector index can be uint64_t instead of Value*.

Test Plan: Unit test included.

Reviewers: majnemer

Reviewed By: majnemer

Subscribers: majnemer, llvm-commits

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

llvm-svn: 236214

show more ...


# f817c1cb 11-Apr-2015 Alexander Kornienko <alexfh@google.com>

Use 'override/final' instead of 'virtual' for overridden methods

The patch is generated using clang-tidy misc-use-override check.

This command was used:

tools/clang/tools/extra/clang-tidy/tool/r

Use 'override/final' instead of 'virtual' for overridden methods

The patch is generated using clang-tidy misc-use-override check.

This command was used:

tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py \
-checks='-*,misc-use-override' -header-filter='llvm|clang' \
-j=32 -fix -format

http://reviews.llvm.org/D8925

llvm-svn: 234679

show more ...


# a5099dce 06-Apr-2015 Duncan P. N. Exon Smith <dexonsmith@apple.com>

DebugInfo: Remove DIDescriptor::Verify()

Remove `DIDescriptor::Verify()` and the `Verify()`s from subclasses.
They had already been gutted, and just did an `isa<>` check.

In a couple of cases I've

DebugInfo: Remove DIDescriptor::Verify()

Remove `DIDescriptor::Verify()` and the `Verify()`s from subclasses.
They had already been gutted, and just did an `isa<>` check.

In a couple of cases I've temporarily dropped the check entirely, but
subsequent commits are going to disallow conversions to the
`DIDescriptor`s directly from `MDNode`, so the checks will come back in
another form soon enough.

llvm-svn: 234201

show more ...


# 3ee34e14 31-Mar-2015 Duncan P. N. Exon Smith <dexonsmith@apple.com>

Verifier: Move over DISubprogram::Verify()

Move over the remaining (somewhat complicated) check from
`DISubprogram::Verify()`. I suspect this check could be optimized --
e.g., it would be nice not

Verifier: Move over DISubprogram::Verify()

Move over the remaining (somewhat complicated) check from
`DISubprogram::Verify()`. I suspect this check could be optimized --
e.g., it would be nice not to do another full traversal here -- but it's
not exactly obvious how. For now, just bring it over as is.

Once we have a better model for the "canonical" subprogram of a
`Function`, we should enforce that all `!dbg` attachments lead to the
canonical one.

llvm-svn: 233663

show more ...


# 0e202b95 30-Mar-2015 Duncan P. N. Exon Smith <dexonsmith@apple.com>

Verifier: Add operand checks for MDLexicalBlock

Add operand checks for `MDLexicalBlock` and `MDLexicalBlockFile`. Like
`MDLocalVariable` and `MDLocation`, these nodes always require a scope.

There

Verifier: Add operand checks for MDLexicalBlock

Add operand checks for `MDLexicalBlock` and `MDLexicalBlockFile`. Like
`MDLocalVariable` and `MDLocation`, these nodes always require a scope.

There was no test bitrot to fix here (just updated the serialization
tests in test/Assembler/mdlexicalblock.ll).

llvm-svn: 233561

show more ...


Revision tags: llvmorg-3.5.2, llvmorg-3.5.2-rc1
# a28d91d8 10-Mar-2015 Mehdi Amini <mehdi.amini@apple.com>

DataLayout is mandatory, update the API to reflect it with references.

Summary:
Now that the DataLayout is a mandatory part of the module, let's start
cleaning the codebase. This patch is a first at

DataLayout is mandatory, update the API to reflect it with references.

Summary:
Now that the DataLayout is a mandatory part of the module, let's start
cleaning the codebase. This patch is a first attempt at doing that.

This patch is not exactly NFC as for instance some places were passing
a nullptr instead of the DataLayout, possibly just because there was a
default value on the DataLayout argument to many functions in the API.
Even though it is not purely NFC, there is no change in the
validation.

I turned as many pointer to DataLayout to references, this helped
figuring out all the places where a nullptr could come up.

I had initially a local version of this patch broken into over 30
independant, commits but some later commit were cleaning the API and
touching part of the code modified in the previous commits, so it
seemed cleaner without the intermediate state.

Test Plan:

Reviewers: echristo

Subscribers: llvm-commits

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

show more ...


# 46a43556 04-Mar-2015 Mehdi Amini <mehdi.amini@apple.com>

Make DataLayout Non-Optional in the Module

Summary:
DataLayout keeps the string used for its creation.

As a side effect it is no longer needed in the Module.
This is "almost" NFC, the string is no

Make DataLayout Non-Optional in the Module

Summary:
DataLayout keeps the string used for its creation.

As a side effect it is no longer needed in the Module.
This is "almost" NFC, the string is no longer
canonicalized, you can't rely on two "equals" DataLayout
having the same string returned by getStringRepresentation().

Get rid of DataLayoutPass: the DataLayout is in the Module

The DataLayout is "per-module", let's enforce this by not
duplicating it more than necessary.
One more step toward non-optionality of the DataLayout in the
module.

Make DataLayout Non-Optional in the Module

Module->getDataLayout() will never returns nullptr anymore.

Reviewers: echristo

Subscribers: resistor, llvm-commits, jholewinski

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

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

show more ...


Revision tags: llvmorg-3.6.0, llvmorg-3.6.0-rc4, llvmorg-3.6.0-rc3, llvmorg-3.6.0-rc2
# abf5553e 21-Jan-2015 Adrian Prantl <aprantl@apple.com>

simplify expression

llvm-svn: 226701


# 53d382fc 21-Jan-2015 Adrian Prantl <aprantl@apple.com>

Fix a compile issue on MSVC and call finalize().

llvm-svn: 226694


# 1292e24d 21-Jan-2015 Adrian Prantl <aprantl@apple.com>

Let subprograms with instructions without parent scopes fail the
verification. Tested via a unit test.

Follow-up to r226616.

llvm-svn: 226684


Revision tags: llvmorg-3.6.0-rc1, llvmorg-3.5.1, llvmorg-3.5.1-rc2, llvmorg-3.5.1-rc1, llvmorg-3.5.0
# b2325b9a 02-Sep-2014 Sanjay Patel <spatel@rotateright.com>

Fix a logic bug when copying fast-math flags.

"Setting" does not equal "copying". This bug has sat dormant for 2 reasons:
1. The unit test was not adequate.
2. Every current user of the "copyFastMat

Fix a logic bug when copying fast-math flags.

"Setting" does not equal "copying". This bug has sat dormant for 2 reasons:
1. The unit test was not adequate.
2. Every current user of the "copyFastMathFlags" API is operating on a new instruction.
(ie, all existing fast-math flags are off). If you copy flags to an existing
instruction that has some flags on already, you will not necessarily turn them off
as expected.

I uncovered this bug while trying to implement a fix for PR20802.

llvm-svn: 216939

show more ...


Revision tags: llvmorg-3.5.0-rc4, llvmorg-3.5.0-rc3, llvmorg-3.5.0-rc2, llvmorg-3.5.0-rc1
# 66f09ad0 08-Jun-2014 Craig Topper <craig.topper@gmail.com>

[C++11] Use 'nullptr'.

llvm-svn: 210442


Revision tags: llvmorg-3.4.2, llvmorg-3.4.2-rc1, llvmorg-3.4.1, llvmorg-3.4.1-rc2, llvmorg-3.4.1-rc1
# 56440fd8 06-Mar-2014 Ahmed Charles <ahmedcharles@gmail.com>

Replace OwningPtr<T> with std::unique_ptr<T>.

This compiles with no changes to clang/lld/lldb with MSVC and includes
overloads to various functions which are used by those projects and llvm
which ha

Replace OwningPtr<T> with std::unique_ptr<T>.

This compiles with no changes to clang/lld/lldb with MSVC and includes
overloads to various functions which are used by those projects and llvm
which have OwningPtr's as parameters. This should allow out of tree
projects some time to move. There are also no changes to libs/Target,
which should help out of tree targets have time to move, if necessary.

llvm-svn: 203083

show more ...


# 64396b06 04-Mar-2014 Chandler Carruth <chandlerc@gmail.com>

[Modules] Move the NoFolder into the IR library as it creates
instructions.

llvm-svn: 202834


# 248ac139 25-Feb-2014 Rafael Espindola <rafael.espindola@gmail.com>

Fix resetting the DataLayout in a Module.

No tool does this currently, but as everything else in a module we should be
able to change its DataLayout.

Most of the fix is in DataLayout to make sure i

Fix resetting the DataLayout in a Module.

No tool does this currently, but as everything else in a module we should be
able to change its DataLayout.

Most of the fix is in DataLayout to make sure it can be reset properly.

The test uses Module::setDataLayout since the fact that we mutate a DataLayout
is an implementation detail. The module could hold a OwningPtr<DataLayout> and
the DataLayout itself could be immutable.

Thanks to Philip Reames for pushing me in the right direction.

llvm-svn: 202198

show more ...


# 0db10c4f 05-Jan-2014 Chandler Carruth <chandlerc@gmail.com>

Fix a bug in IRBuilder that's been there for who knows how long. It
failed to correctly propagate the NUW and NSW flags to the constant
folder for two instructions. I've added a unittest to cover fla

Fix a bug in IRBuilder that's been there for who knows how long. It
failed to correctly propagate the NUW and NSW flags to the constant
folder for two instructions. I've added a unittest to cover flag
propagation for the rest of the instructions and constant expressions.

llvm-svn: 198538

show more ...


Revision tags: llvmorg-3.4.0, llvmorg-3.4.0-rc3
# be92bcb3 05-Dec-2013 Michael Ilseman <milseman@apple.com>

Use present fast-math flags when applicable in CreateBinOp

We were previously not adding fast-math flags through CreateBinOp()
when it happened to be making a floating point binary operator. This
pa

Use present fast-math flags when applicable in CreateBinOp

We were previously not adding fast-math flags through CreateBinOp()
when it happened to be making a floating point binary operator. This
patch updates it to do so similarly to directly calling CreateF*().

llvm-svn: 196438

show more ...


Revision tags: llvmorg-3.4.0-rc2, llvmorg-3.4.0-rc1
# 63d39da9 15-Nov-2013 Benjamin Kramer <benny.kra@googlemail.com>

Give unit test its own LLVMContext so MDNodes aren't leaked even if we never call llvm_shutdown.

Found by valgrind.

llvm-svn: 194797


# 3cab3740 05-Oct-2013 Aaron Ballman <aaron@aaronballman.com>

Silencing an MSVC warning.

llvm-svn: 192042


# d36f1abe 30-Sep-2013 Benjamin Kramer <benny.kra@googlemail.com>

IRBuilder: Add RAII objects to reset insertion points or fast math flags.

Inspired by the object from the SLPVectorizer. This found a minor bug in the
debug loc restoration in the vectorizer where t

IRBuilder: Add RAII objects to reset insertion points or fast math flags.

Inspired by the object from the SLPVectorizer. This found a minor bug in the
debug loc restoration in the vectorizer where the location of a following
instruction was attached instead of the location from the original instruction.

llvm-svn: 191673

show more ...


Revision tags: llvmorg-3.3.1-rc1, llvmorg-3.3.0, llvmorg-3.3.0-rc3, llvmorg-3.3.0-rc2, llvmorg-3.3.0-rc1
# d86cd785 23-Jan-2013 NAKAMURA Takumi <geek4civic@gmail.com>

IRTests/IRBuilderTest.cpp: GetIntTy: Delete DL at yourself since it is not linked.

llvm-svn: 173238


# 74936586 23-Jan-2013 NAKAMURA Takumi <geek4civic@gmail.com>

IRTests/IRBuilderTest.cpp: Let GV added to the module.

It fixes --vg-leak.

llvm-svn: 173237


# 74b6a77d 07-Jan-2013 Chandler Carruth <chandlerc@gmail.com>

Rename the VMCore unittest tree to IR. Somehow was missed when doing the
library rename.

llvm-svn: 171747


12345