Commit Graph

23 Commits

Author SHA1 Message Date
Daniel Rodríguez Troitiño
8c6bda7efd [android] Fix IRGen/condfail.sil test for Android ARMv7/AArch64.
For AArch64, the fix is duplicating the arm64 lines, since those are not
taken when testing Android/Linux which use AArch64 as the architecture.

For ARMv7, the change is supporting both trap and .inst 0xe7ffdefe.
According to llvm/lib/Target/ARM/ARMAsmPrinter.cpp, non-Darwin binutils
do not support the mnemonic trap, so an .inst is emitted instead. The
same instruction has to be used in both places, though.

For both architectures add the Android version of APP/NO_APP, which uses
@-symbols or // instead of ##.
2019-03-27 10:51:53 -07:00
Saleem Abdulrasool
23936574a4 test: adjustments for Windows
Introduce and use the new `%target-abi` and `%target-import-type`
subsitutions in the IRGen tests.  The former allows us to differentiate
between the Windows and SysV ABI differences and the latter for the
indirected import semantics required by PE/COFF.  This makes all the
IRGen tests succeed on Windows.
2019-02-20 17:06:34 -08:00
Michael Gottesman
fd4828e40a Eliminate -assume-parsing-unqualified-ownership-sil from tests.
I am doing this separately from the actual change to eliminate the option to
make it easier to review.
2018-12-19 12:54:13 -08:00
Vivian Kong
7730562cae Fix IRGen/condfail.sil on s390x 2017-04-12 11:56:00 -04:00
Michael Gottesman
20dd563efb [semantic-arc] Update tests for qualified/unqualified ownership and SILGen emission of copy_value, destroy_value. 2016-10-29 20:11:09 -07:00
Arnold Schwaighofer
1ec78b2f98 Fix condfail test on armv7(s)
We don't emit cfi on armv7

rdar://28247535
2016-09-20 10:21:14 -07:00
Dmitri Gribenko
d175b3b66d Migrate FileCheck to %FileCheck in tests 2016-08-10 23:52:02 -07:00
Mark Lacey
122827ea00 Only emit empty inline asm instructions for cond_fail when optimizing.
These inline asm instructions are used to block branch folding when
optimizing, to ensure that we have unique trap locations (and associated
debug info) for each cond_fail.

We only need these when we're optimizing, and emitting them can block
fast isel, so only emit them when optimizing.
2016-07-26 15:38:47 -07:00
Luke Larson
74e0498015 Revert "Update master to build with Xcode 8 beta 3, OS X 10.12, iOS 10, tvOS 10, and watchOS 3 SDKs."
This reverts commit 62d1fa760c.
2016-07-19 15:18:17 -07:00
Mishal Shah
62d1fa760c Update master to build with Xcode 8 beta 3, OS X 10.12, iOS 10, tvOS 10, and watchOS 3 SDKs. 2016-07-19 22:31:34 +02:00
Dmitri Gribenko
c0eb32a381 tests: add missing CHECK lines for armv7s, copied from armv7 2016-05-31 00:50:45 -07:00
Bryan Chan
e66f7fd565 Fix test/IRGen/condfail.sil and test/IRGen/c_layout.sil for s390x 2016-05-24 20:03:57 -04:00
Russell Currey
0605254dc6 test: Fix IRGen/condfail.sil to work on powerpc64{le} 2016-05-11 11:54:59 +10:00
Mark Lacey
b21a9e7fd0 Try to ensure we generate unique trap locations.
In 2e3c0b6, code was added to emit unique trap blocks for each
cond_fail, in order to make post-mortem debugging simpler (e.g. stack
traces have correct line/column information for the trapping location,
and it's easy to trace back to the specific jump that reaches the trap).

We didn't, however, do anything to ensure that LLVM wouldn't merge these
back together again. This is an attempt to do exactly that, after seeing
BranchFolding in the code generator merging traps into a single block.

The idea here is to emit empty inline asm strings marked as
side-effecting, and taking a unique integer argument. These come before
the trap call, so they should block any valid attempt at merging the
blocks back together.

Ideally trap would take an argument which uniquely identifies it, but
that isn't possible today.

This solution is potentially brittle in that in theory LLVM could still
merge the trap/unreachable and then branch to those after the unique asm
calls. We cannot fix that by putting another asm call after the trap,
because LLVM's CFG simplification will delete code after a trap.

rdar://problem/25216969
2016-03-17 15:52:41 -07:00
Dmitri Hrybenko
4375a463a7 stdlib: rename Int**.value and Float**.value to _value per naming convention
rdar://21357661

Swift SVN r32096
2015-09-20 00:01:13 +00:00
Roman Levenstein
4cef619c19 Revert "Verify SIL modules at the beginning and at the end of the SIL optimization pipelines, if -sil-verify-all is provided"
This reverts commit r31863, which was committed by mistake.

Swift SVN r31864
2015-09-10 22:32:36 +00:00
Roman Levenstein
141b8f814d Verify SIL modules at the beginning and at the end of the SIL optimization pipelines, if -sil-verify-all is provided
Till now, a SIL module would be only verified if an optimization has changed it. But if there were no changes, then no verification would happen and some SIL module format errors would stay unnoticed. This was happening in certain cases when reading a textual SIL module representation, which turned out to be broken, but SIL verifier wouldn't catch it.

Swift SVN r31863
2015-09-10 22:26:37 +00:00
Roman Levenstein
66e13af73e Add support for whole-module optimizations for SIL files.
To invoke the front-end on a SIL with whole-module optimizations enabled, execute:
swiftc -frontend myfile.sil

To invoke the front-end on a SIL without whole-module optimizations enabled, add a -primary-file option:
swiftc -frontend -primary-file myfile.sil

To invoke a sil-opt with whole-module optimizations enabled, use the -wmo option:
sil-opt myfile.sil -wmo

This change was need to be able to write SIL unit tests which should be compiled in the WMO mode.

Swift SVN r31862
2015-09-10 22:26:35 +00:00
Manman Ren
e94aae06da [Function Attribute] add target-cpu and target-features sets if they're non-null.
All llvm::Functions created during IRGen will have target-cpu and target-features
attributes if they are non-null.

Update testing cases to expect the attribute in function definition.
Add testing case function-target-features.swift to verify target-cpu and
target-features.

rdar://20772331


Swift SVN r28186
2015-05-05 23:19:48 +00:00
Joe Groff
c0a2994564 AST: Start printing function types with @convention instead of old attributes.
And update tests to match.

Swift SVN r27262
2015-04-13 22:51:34 +00:00
Arnold Schwaighofer
2e3c0b69f7 IRGen: Emit failure blocks individually
Reapply commit r24722.

The original commit did not break the build. There appears to be an issue in
CoreAutomation (an iOS test failed with empty output). Follow up builds with
the original commit in succeeded.

Also apply Dimitri's patch to make the test condfail.sil portable.

Original message:

This significantly improves debugging experience as failures such as overflow
can be mapped back to a source line.

Code size impacts I measured on PerfTestSuite and libswift*.dylib was
neglectable.

__text section size increase:

  0.24% bin/PerfTest_O
  0.01% bin/PerfTest_Onone
  0.20% libswift*.dylib

rdar://19118593

Swift SVN r24725
2015-01-26 00:35:53 +00:00
Arnold Schwaighofer
15b7a9347d Revert "IRGen: Emit failure blocks individually"
This reverts commit r24722.

It has broken a build bot.

Swift SVN r24724
2015-01-25 23:38:13 +00:00
Arnold Schwaighofer
de50dcae24 IRGen: Emit failure blocks individually
This significantly improves debugging experience as failures such as overflow
can be mapped back to a source line.

Code size impacts I measured on PerfTestSuite and libswift*.dylib was
neglectable.

__text section size increase:

  0.24% bin/PerfTest_O
  0.01% bin/PerfTest_Onone
  0.20% libswift*.dylib

rdar://19118593

Swift SVN r24722
2015-01-25 20:55:59 +00:00