Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
swiftshader
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
swiftshader
Commits
0d4fc92b
Commit
0d4fc92b
authored
Dec 13, 2015
by
Jim Stichnoth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eliminate code related to --no-ir-gen
BUG= R=stichnot@chromium.org Review URL:
https://codereview.chromium.org/1522433004
.
parent
2a18dd3f
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
35 changed files
with
41 additions
and
121 deletions
+41
-121
CMakeLists.txt
CMakeLists.txt
+0
-2
Makefile
Makefile
+4
-4
Makefile.standalone
Makefile.standalone
+2
-4
IceBuildDefs.h
src/IceBuildDefs.h
+7
-11
IceClFlags.cpp
src/IceClFlags.cpp
+1
-8
IceClFlags.h
src/IceClFlags.h
+0
-6
IceCompiler.cpp
src/IceCompiler.cpp
+0
-7
IceConverter.cpp
src/IceConverter.cpp
+0
-2
IceGlobalContext.h
src/IceGlobalContext.h
+0
-4
IceOperand.h
src/IceOperand.h
+0
-6
PNaClTranslator.cpp
src/PNaClTranslator.cpp
+0
-0
bad-bb-size.test
tests_lit/parse_errs/bad-bb-size.test
+1
-1
bad-global-alignment.test
tests_lit/parse_errs/bad-global-alignment.test
+1
-1
bad-var-fwdref.test
tests_lit/parse_errs/bad-var-fwdref.test
+1
-1
duplicate-fcn-name.test
tests_lit/parse_errs/duplicate-fcn-name.test
+1
-1
alloca.ll
tests_lit/reader_tests/alloca.ll
+1
-3
binops.ll
tests_lit/reader_tests/binops.ll
+1
-3
branch.ll
tests_lit/reader_tests/branch.ll
+1
-3
call.ll
tests_lit/reader_tests/call.ll
+2
-4
casts.ll
tests_lit/reader_tests/casts.ll
+1
-3
compare.ll
tests_lit/reader_tests/compare.ll
+1
-3
constants.ll
tests_lit/reader_tests/constants.ll
+1
-3
forwardref.ll
tests_lit/reader_tests/forwardref.ll
+1
-3
globalinit.pnacl.ll
tests_lit/reader_tests/globalinit.pnacl.ll
+2
-4
globalrelocs.ll
tests_lit/reader_tests/globalrelocs.ll
+1
-3
insertextract.ll
tests_lit/reader_tests/insertextract.ll
+1
-3
load.ll
tests_lit/reader_tests/load.ll
+1
-3
nacl-atomic-intrinsics.ll
tests_lit/reader_tests/nacl-atomic-intrinsics.ll
+1
-3
nacl-other-intrinsics.ll
tests_lit/reader_tests/nacl-other-intrinsics.ll
+2
-4
phi.ll
tests_lit/reader_tests/phi.ll
+1
-3
select.ll
tests_lit/reader_tests/select.ll
+1
-3
store.ll
tests_lit/reader_tests/store.ll
+1
-3
switch.ll
tests_lit/reader_tests/switch.ll
+1
-3
unnamed.ll
tests_lit/reader_tests/unnamed.ll
+1
-3
unreachable.ll
tests_lit/reader_tests/unreachable.ll
+1
-3
No files found.
CMakeLists.txt
View file @
0d4fc92b
...
@@ -16,7 +16,6 @@ if(PNACL_BROWSER_TRANSLATOR)
...
@@ -16,7 +16,6 @@ if(PNACL_BROWSER_TRANSLATOR)
-DALLOW_LLVM_CL=0
-DALLOW_LLVM_CL=0
-DALLOW_LLVM_IR=0
-DALLOW_LLVM_IR=0
-DALLOW_LLVM_IR_AS_INPUT=0
-DALLOW_LLVM_IR_AS_INPUT=0
-DALLOW_DISABLE_IR_GEN=0
-DALLOW_MINIMAL_BUILD=1
-DALLOW_MINIMAL_BUILD=1
-DPNACL_BROWSER_TRANSLATOR=1
-DPNACL_BROWSER_TRANSLATOR=1
)
)
...
@@ -26,7 +25,6 @@ else()
...
@@ -26,7 +25,6 @@ else()
-DALLOW_LLVM_CL=1
-DALLOW_LLVM_CL=1
-DALLOW_LLVM_IR=1
-DALLOW_LLVM_IR=1
-DALLOW_LLVM_IR_AS_INPUT=1
-DALLOW_LLVM_IR_AS_INPUT=1
-DALLOW_DISABLE_IR_GEN=1
-DALLOW_MINIMAL_BUILD=0
-DALLOW_MINIMAL_BUILD=0
-DPNACL_BROWSER_TRANSLATOR=0
-DPNACL_BROWSER_TRANSLATOR=0
)
)
...
...
Makefile
View file @
0d4fc92b
...
@@ -21,11 +21,11 @@ CXX.Flags += -std=gnu++11
...
@@ -21,11 +21,11 @@ CXX.Flags += -std=gnu++11
ifeq
($(PNACL_BROWSER_TRANSLATOR),1)
ifeq
($(PNACL_BROWSER_TRANSLATOR),1)
CPP.Defines
+=
-DALLOW_DUMP
=
0
-DALLOW_LLVM_CL
=
0
-DALLOW_LLVM_IR
=
0
\
CPP.Defines
+=
-DALLOW_DUMP
=
0
-DALLOW_LLVM_CL
=
0
-DALLOW_LLVM_IR
=
0
\
-DALLOW_LLVM_IR_AS_INPUT
=
0
-DALLOW_
DISABLE_IR_GEN
=
0
\
-DALLOW_LLVM_IR_AS_INPUT
=
0
-DALLOW_
MINIMAL_BUILD
=
1
\
-D
ALLOW_MINIMAL_BUILD
=
1
-D
PNACL_BROWSER_TRANSLATOR
=
1
-DPNACL_BROWSER_TRANSLATOR
=
1
else
else
CPP.Defines
+=
-DALLOW_DUMP
=
1
-DALLOW_LLVM_CL
=
1
-DALLOW_LLVM_IR
=
1
\
CPP.Defines
+=
-DALLOW_DUMP
=
1
-DALLOW_LLVM_CL
=
1
-DALLOW_LLVM_IR
=
1
\
-DALLOW_LLVM_IR_AS_INPUT
=
1
-DALLOW_
DISABLE_IR_GEN
=
1
\
-DALLOW_LLVM_IR_AS_INPUT
=
1
-DALLOW_
MINIMAL_BUILD
=
0
\
-D
ALLOW_MINIMAL_BUILD
=
0
-D
PNACL_BROWSER_TRANSLATOR
=
0
-DPNACL_BROWSER_TRANSLATOR
=
0
endif
endif
Makefile.standalone
View file @
0d4fc92b
...
@@ -78,12 +78,10 @@ ifdef MINIMAL
...
@@ -78,12 +78,10 @@ ifdef MINIMAL
NOASSERT
=
1
NOASSERT
=
1
OBJDIR
:=
$(OBJDIR)
+Min
OBJDIR
:=
$(OBJDIR)
+Min
BASE_CXX_DEFINES
+=
-DALLOW_DUMP
=
0
-DALLOW_LLVM_CL
=
0
-DALLOW_LLVM_IR
=
0
\
BASE_CXX_DEFINES
+=
-DALLOW_DUMP
=
0
-DALLOW_LLVM_CL
=
0
-DALLOW_LLVM_IR
=
0
\
-DALLOW_LLVM_IR_AS_INPUT
=
0
-DALLOW_DISABLE_IR_GEN
=
0
\
-DALLOW_LLVM_IR_AS_INPUT
=
0
-DALLOW_MINIMAL_BUILD
=
1
-DALLOW_MINIMAL_BUILD
=
1
else
else
BASE_CXX_DEFINES
+=
-DALLOW_DUMP
=
1
-DALLOW_LLVM_CL
=
1
-DALLOW_LLVM_IR
=
1
\
BASE_CXX_DEFINES
+=
-DALLOW_DUMP
=
1
-DALLOW_LLVM_CL
=
1
-DALLOW_LLVM_IR
=
1
\
-DALLOW_LLVM_IR_AS_INPUT
=
1
-DALLOW_DISABLE_IR_GEN
=
1
\
-DALLOW_LLVM_IR_AS_INPUT
=
1
-DALLOW_MINIMAL_BUILD
=
0
-DALLOW_MINIMAL_BUILD
=
0
endif
endif
SB_CXX_DEFINES
:=
$(BASE_CXX_DEFINES)
-DPNACL_BROWSER_TRANSLATOR
=
1
SB_CXX_DEFINES
:=
$(BASE_CXX_DEFINES)
-DPNACL_BROWSER_TRANSLATOR
=
1
...
...
src/IceBuildDefs.h
View file @
0d4fc92b
...
@@ -15,14 +15,14 @@
...
@@ -15,14 +15,14 @@
#define SUBZERO_SRC_ICEBUILDDEFS_H
#define SUBZERO_SRC_ICEBUILDDEFS_H
namespace
Ice
{
namespace
Ice
{
/// \brief Defines constexpr functions that express various Subzero build
/// \brief Defines constexpr functions that express various Subzero build
/// system defined values.
/// system defined values.
///
///
/// These resulting constexpr functions allow code to in effect be
/// These resulting constexpr functions allow code to in effect be
/// conditionally compiled without having to do this using the older C++
/// conditionally compiled without having to do this using the older C++
/// preprocessor solution.
/// preprocessor solution.
/** \verbatim
/** \verbatim
For example whenever the value of FEATURE_SUPPORTED is needed, instead
For example whenever the value of FEATURE_SUPPORTED is needed, instead
of (except in these constexpr functions):
of (except in these constexpr functions):
...
@@ -72,13 +72,9 @@ namespace Ice {
...
@@ -72,13 +72,9 @@ namespace Ice {
**/
**/
namespace
BuildDefs
{
namespace
BuildDefs
{
// The ALLOW_* etc. symbols must be #defined to zero or non-zero.
// The ALLOW_* etc. symbols must be #defined to zero or non-zero.
/// Return true if ALLOW_DISABLE_IR_GEN is defined as a non-zero value
constexpr
bool
disableIrGen
()
{
return
ALLOW_DISABLE_IR_GEN
;
}
/// Return true if ALLOW_DUMP is defined as a non-zero value
constexpr
bool
dump
()
{
return
ALLOW_DUMP
;
}
constexpr
bool
dump
()
{
return
ALLOW_DUMP
;
}
/// Return true if ALLOW_LLVM_CL is defined as a non-zero value
/// Return true if ALLOW_LLVM_CL is defined as a non-zero value
constexpr
bool
llvmCl
()
{
return
ALLOW_LLVM_CL
;
}
constexpr
bool
llvmCl
()
{
return
ALLOW_LLVM_CL
;
}
...
...
src/IceClFlags.cpp
View file @
0d4fc92b
...
@@ -82,9 +82,7 @@ cl::opt<bool> DisableHybridAssembly(
...
@@ -82,9 +82,7 @@ cl::opt<bool> DisableHybridAssembly(
cl
::
opt
<
bool
>
DisableInternal
(
"externalize"
,
cl
::
opt
<
bool
>
DisableInternal
(
"externalize"
,
cl
::
desc
(
"Externalize all symbols"
));
cl
::
desc
(
"Externalize all symbols"
));
// Note: Modifiable only if ALLOW_DISABLE_IR_GEN.
cl
::
opt
<
bool
>
DisableIRGeneration
(
"no-ir-gen"
,
cl
::
desc
(
"Disable generating Subzero IR."
));
cl
::
opt
<
bool
>
DisableTranslation
(
"notranslate"
,
cl
::
opt
<
bool
>
DisableTranslation
(
"notranslate"
,
cl
::
desc
(
"Disable Subzero translation"
));
cl
::
desc
(
"Disable Subzero translation"
));
...
@@ -390,7 +388,6 @@ void ClFlags::resetClFlags(ClFlags &OutFlags) {
...
@@ -390,7 +388,6 @@ void ClFlags::resetClFlags(ClFlags &OutFlags) {
OutFlags
.
DecorateAsm
=
false
;
OutFlags
.
DecorateAsm
=
false
;
OutFlags
.
DisableHybridAssembly
=
false
;
OutFlags
.
DisableHybridAssembly
=
false
;
OutFlags
.
DisableInternal
=
false
;
OutFlags
.
DisableInternal
=
false
;
OutFlags
.
DisableIRGeneration
=
false
;
OutFlags
.
DisableTranslation
=
false
;
OutFlags
.
DisableTranslation
=
false
;
OutFlags
.
DumpStats
=
false
;
OutFlags
.
DumpStats
=
false
;
OutFlags
.
EnableBlockProfile
=
false
;
OutFlags
.
EnableBlockProfile
=
false
;
...
@@ -434,9 +431,6 @@ void ClFlags::resetClFlags(ClFlags &OutFlags) {
...
@@ -434,9 +431,6 @@ void ClFlags::resetClFlags(ClFlags &OutFlags) {
}
}
void
ClFlags
::
getParsedClFlags
(
ClFlags
&
OutFlags
)
{
void
ClFlags
::
getParsedClFlags
(
ClFlags
&
OutFlags
)
{
if
(
::
DisableIRGeneration
)
::
DisableTranslation
=
true
;
Ice
::
VerboseMask
VMask
=
Ice
::
IceV_None
;
Ice
::
VerboseMask
VMask
=
Ice
::
IceV_None
;
// Don't generate verbose messages if routines to dump messages are not
// Don't generate verbose messages if routines to dump messages are not
// available.
// available.
...
@@ -457,7 +451,6 @@ void ClFlags::getParsedClFlags(ClFlags &OutFlags) {
...
@@ -457,7 +451,6 @@ void ClFlags::getParsedClFlags(ClFlags &OutFlags) {
OutFlags
.
setDisableHybridAssembly
(
::
DisableHybridAssembly
||
OutFlags
.
setDisableHybridAssembly
(
::
DisableHybridAssembly
||
(
::
OutFileType
!=
Ice
::
FT_Iasm
));
(
::
OutFileType
!=
Ice
::
FT_Iasm
));
OutFlags
.
setDisableInternal
(
::
DisableInternal
);
OutFlags
.
setDisableInternal
(
::
DisableInternal
);
OutFlags
.
setDisableIRGeneration
(
::
DisableIRGeneration
);
OutFlags
.
setDisableTranslation
(
::
DisableTranslation
);
OutFlags
.
setDisableTranslation
(
::
DisableTranslation
);
OutFlags
.
setDumpStats
(
::
DumpStats
);
OutFlags
.
setDumpStats
(
::
DumpStats
);
OutFlags
.
setEnableBlockProfile
(
::
EnableBlockProfile
);
OutFlags
.
setEnableBlockProfile
(
::
EnableBlockProfile
);
...
...
src/IceClFlags.h
View file @
0d4fc92b
...
@@ -70,11 +70,6 @@ public:
...
@@ -70,11 +70,6 @@ public:
bool
getDisableInternal
()
const
{
return
DisableInternal
;
}
bool
getDisableInternal
()
const
{
return
DisableInternal
;
}
void
setDisableInternal
(
bool
NewValue
)
{
DisableInternal
=
NewValue
;
}
void
setDisableInternal
(
bool
NewValue
)
{
DisableInternal
=
NewValue
;
}
bool
getDisableIRGeneration
()
const
{
return
BuildDefs
::
disableIrGen
()
&&
DisableIRGeneration
;
}
void
setDisableIRGeneration
(
bool
NewValue
)
{
DisableIRGeneration
=
NewValue
;
}
bool
getDisableTranslation
()
const
{
return
DisableTranslation
;
}
bool
getDisableTranslation
()
const
{
return
DisableTranslation
;
}
void
setDisableTranslation
(
bool
NewValue
)
{
DisableTranslation
=
NewValue
;
}
void
setDisableTranslation
(
bool
NewValue
)
{
DisableTranslation
=
NewValue
;
}
...
@@ -260,7 +255,6 @@ private:
...
@@ -260,7 +255,6 @@ private:
bool
DecorateAsm
;
bool
DecorateAsm
;
bool
DisableHybridAssembly
;
bool
DisableHybridAssembly
;
bool
DisableInternal
;
bool
DisableInternal
;
bool
DisableIRGeneration
;
bool
DisableTranslation
;
bool
DisableTranslation
;
bool
DumpStats
;
bool
DumpStats
;
bool
EnableBlockProfile
;
bool
EnableBlockProfile
;
...
...
src/IceCompiler.cpp
View file @
0d4fc92b
...
@@ -47,7 +47,6 @@ struct {
...
@@ -47,7 +47,6 @@ struct {
int
FlagValue
;
int
FlagValue
;
}
ConditionalBuildAttributes
[]
=
{
}
ConditionalBuildAttributes
[]
=
{
{
"dump"
,
BuildDefs
::
dump
()},
{
"dump"
,
BuildDefs
::
dump
()},
{
"disable_ir_gen"
,
BuildDefs
::
disableIrGen
()},
{
"llvm_cl"
,
BuildDefs
::
llvmCl
()},
{
"llvm_cl"
,
BuildDefs
::
llvmCl
()},
{
"llvm_ir"
,
BuildDefs
::
llvmIr
()},
{
"llvm_ir"
,
BuildDefs
::
llvmIr
()},
{
"llvm_ir_as_input"
,
BuildDefs
::
llvmIrAsInput
()},
{
"llvm_ir_as_input"
,
BuildDefs
::
llvmIrAsInput
()},
...
@@ -95,12 +94,6 @@ void Compiler::run(const Ice::ClFlagsExtra &ExtraFlags, GlobalContext &Ctx,
...
@@ -95,12 +94,6 @@ void Compiler::run(const Ice::ClFlagsExtra &ExtraFlags, GlobalContext &Ctx,
if
(
ExtraFlags
.
getGenerateBuildAtts
())
if
(
ExtraFlags
.
getGenerateBuildAtts
())
return
Ctx
.
getErrorStatus
()
->
assign
(
EC_None
);
return
Ctx
.
getErrorStatus
()
->
assign
(
EC_None
);
if
(
!
BuildDefs
::
disableIrGen
()
&&
Ctx
.
getFlags
().
getDisableIRGeneration
())
{
Ctx
.
getStrError
()
<<
"Error: Build doesn't allow --no-ir-gen when not "
<<
"ALLOW_DISABLE_IR_GEN!
\n
"
;
return
Ctx
.
getErrorStatus
()
->
assign
(
EC_Args
);
}
// The Minimal build (specifically, when dump()/emit() are not implemented)
// The Minimal build (specifically, when dump()/emit() are not implemented)
// allows only --filetype=obj. Check here to avoid cryptic error messages
// allows only --filetype=obj. Check here to avoid cryptic error messages
// downstream.
// downstream.
...
...
src/IceConverter.cpp
View file @
0d4fc92b
...
@@ -89,8 +89,6 @@ public:
...
@@ -89,8 +89,6 @@ public:
:
LLVM2ICEConverter
(
Converter
),
Func
(
nullptr
)
{}
:
LLVM2ICEConverter
(
Converter
),
Func
(
nullptr
)
{}
void
convertFunction
(
const
Function
*
F
)
{
void
convertFunction
(
const
Function
*
F
)
{
if
(
Ctx
->
isIRGenerationDisabled
())
return
;
Func
=
Ice
::
Cfg
::
create
(
Ctx
,
Converter
.
getNextSequenceNumber
());
Func
=
Ice
::
Cfg
::
create
(
Ctx
,
Converter
.
getNextSequenceNumber
());
Ice
::
Cfg
::
setCurrentCfg
(
Func
.
get
());
Ice
::
Cfg
::
setCurrentCfg
(
Func
.
get
());
...
...
src/IceGlobalContext.h
View file @
0d4fc92b
...
@@ -222,10 +222,6 @@ public:
...
@@ -222,10 +222,6 @@ public:
const
ClFlags
&
getFlags
()
const
{
return
Flags
;
}
const
ClFlags
&
getFlags
()
const
{
return
Flags
;
}
bool
isIRGenerationDisabled
()
const
{
return
getFlags
().
getDisableIRGeneration
();
}
/// Allocate data of type T using the global allocator. We allow entities
/// Allocate data of type T using the global allocator. We allow entities
/// allocated from this global allocator to be either trivially or
/// allocated from this global allocator to be either trivially or
/// non-trivially destructible. We optimize the case when T is trivially
/// non-trivially destructible. We optimize the case when T is trivially
...
...
src/IceOperand.h
View file @
0d4fc92b
...
@@ -166,8 +166,6 @@ public:
...
@@ -166,8 +166,6 @@ public:
static
ConstantPrimitive
*
create
(
GlobalContext
*
Ctx
,
Type
Ty
,
static
ConstantPrimitive
*
create
(
GlobalContext
*
Ctx
,
Type
Ty
,
PrimType
Value
)
{
PrimType
Value
)
{
assert
(
!
Ctx
->
isIRGenerationDisabled
()
&&
"Attempt to build primitive constant when IR generation disabled"
);
return
new
(
Ctx
->
allocate
<
ConstantPrimitive
>
())
return
new
(
Ctx
->
allocate
<
ConstantPrimitive
>
())
ConstantPrimitive
(
Ty
,
Value
);
ConstantPrimitive
(
Ty
,
Value
);
}
}
...
@@ -279,8 +277,6 @@ class ConstantRelocatable : public Constant {
...
@@ -279,8 +277,6 @@ class ConstantRelocatable : public Constant {
public
:
public
:
static
ConstantRelocatable
*
create
(
GlobalContext
*
Ctx
,
Type
Ty
,
static
ConstantRelocatable
*
create
(
GlobalContext
*
Ctx
,
Type
Ty
,
const
RelocatableTuple
&
Tuple
)
{
const
RelocatableTuple
&
Tuple
)
{
assert
(
!
Ctx
->
isIRGenerationDisabled
()
&&
"Attempt to build relocatable constant when IR generation disabled"
);
return
new
(
Ctx
->
allocate
<
ConstantRelocatable
>
())
ConstantRelocatable
(
return
new
(
Ctx
->
allocate
<
ConstantRelocatable
>
())
ConstantRelocatable
(
Ty
,
Tuple
.
Offset
,
Tuple
.
Name
,
Tuple
.
SuppressMangling
);
Ty
,
Tuple
.
Offset
,
Tuple
.
Name
,
Tuple
.
SuppressMangling
);
}
}
...
@@ -320,8 +316,6 @@ class ConstantUndef : public Constant {
...
@@ -320,8 +316,6 @@ class ConstantUndef : public Constant {
public
:
public
:
static
ConstantUndef
*
create
(
GlobalContext
*
Ctx
,
Type
Ty
)
{
static
ConstantUndef
*
create
(
GlobalContext
*
Ctx
,
Type
Ty
)
{
assert
(
!
Ctx
->
isIRGenerationDisabled
()
&&
"Attempt to build undefined constant when IR generation disabled"
);
return
new
(
Ctx
->
allocate
<
ConstantUndef
>
())
ConstantUndef
(
Ty
);
return
new
(
Ctx
->
allocate
<
ConstantUndef
>
())
ConstantUndef
(
Ty
);
}
}
...
...
src/PNaClTranslator.cpp
View file @
0d4fc92b
This diff is collapsed.
Click to expand it.
tests_lit/parse_errs/bad-bb-size.test
View file @
0d4fc92b
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
;
REQUIRES
:
no_minimal_build
;
REQUIRES
:
no_minimal_build
;
RUN
:
not
%
pnacl_sz
-
bitcode
-
as
-
text
%
p
/
Inputs
/
bad
-
bb
-
size
.
tbc
\
;
RUN
:
not
%
pnacl_sz
-
bitcode
-
as
-
text
%
p
/
Inputs
/
bad
-
bb
-
size
.
tbc
\
;
RUN
:
-
bitcode
-
format
=
pnacl
-
notranslate
-
no
-
ir
-
gen
-
build
-
on
-
read
\
;
RUN
:
-
bitcode
-
format
=
pnacl
-
notranslate
-
build
-
on
-
read
\
;
RUN
:
-
allow
-
externally
-
defined
-
symbols
2
>&
1
\
;
RUN
:
-
allow
-
externally
-
defined
-
symbols
2
>&
1
\
;
RUN
:
|
FileCheck
%
s
;
RUN
:
|
FileCheck
%
s
...
...
tests_lit/parse_errs/bad-global-alignment.test
View file @
0d4fc92b
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
;
REQUIRES
:
no_minimal_build
;
REQUIRES
:
no_minimal_build
;
RUN
:
not
%
pnacl_sz
-
bitcode
-
as
-
text
%
p
/
Inputs
/
bad
-
global
-
alignment
.
tbc
\
;
RUN
:
not
%
pnacl_sz
-
bitcode
-
as
-
text
%
p
/
Inputs
/
bad
-
global
-
alignment
.
tbc
\
;
RUN
:
-
bitcode
-
format
=
pnacl
-
notranslate
-
no
-
ir
-
gen
-
build
-
on
-
read
2
>&
1
\
;
RUN
:
-
bitcode
-
format
=
pnacl
-
notranslate
-
build
-
on
-
read
2
>&
1
\
;
RUN
:
|
FileCheck
%
s
;
RUN
:
|
FileCheck
%
s
;
CHECK
:
Global
variable
alignment
greater
than
2
**
29.
Found
:
2
**
30
;
CHECK
:
Global
variable
alignment
greater
than
2
**
29.
Found
:
2
**
30
...
...
tests_lit/parse_errs/bad-var-fwdref.test
View file @
0d4fc92b
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
;
REQUIRES
:
no_minimal_build
;
REQUIRES
:
no_minimal_build
;
RUN
:
not
%
pnacl_sz
-
bitcode
-
as
-
text
%
p
/
Inputs
/
bad
-
var
-
fwdref
.
tbc
\
;
RUN
:
not
%
pnacl_sz
-
bitcode
-
as
-
text
%
p
/
Inputs
/
bad
-
var
-
fwdref
.
tbc
\
;
RUN
:
-
bitcode
-
format
=
pnacl
-
notranslate
-
no
-
ir
-
gen
-
build
-
on
-
read
\
;
RUN
:
-
bitcode
-
format
=
pnacl
-
notranslate
-
build
-
on
-
read
\
;
RUN
:
-
allow
-
externally
-
defined
-
symbols
2
>&
1
\
;
RUN
:
-
allow
-
externally
-
defined
-
symbols
2
>&
1
\
;
RUN
:
|
FileCheck
%
s
;
RUN
:
|
FileCheck
%
s
...
...
tests_lit/parse_errs/duplicate-fcn-name.test
View file @
0d4fc92b
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
;
REQUIRES
:
no_minimal_build
;
REQUIRES
:
no_minimal_build
;
RUN
:
not
%
pnacl_sz
-
bitcode
-
as
-
text
%
p
/
Inputs
/
duplicate
-
fcn
-
name
.
tbc
\
;
RUN
:
not
%
pnacl_sz
-
bitcode
-
as
-
text
%
p
/
Inputs
/
duplicate
-
fcn
-
name
.
tbc
\
;
RUN
:
-
bitcode
-
format
=
pnacl
-
notranslate
-
no
-
ir
-
gen
-
build
-
on
-
read
2
>&
1
\
;
RUN
:
-
bitcode
-
format
=
pnacl
-
notranslate
-
build
-
on
-
read
2
>&
1
\
;
RUN
:
|
FileCheck
%
s
;
RUN
:
|
FileCheck
%
s
;
CHECK
:
Module
valuesymtab
defines
duplicate
value
name
:
'f'
;
CHECK
:
Module
valuesymtab
defines
duplicate
value
name
:
'f'
...
...
tests_lit/reader_tests/alloca.ll
View file @
0d4fc92b
; Test if we can read alloca instructions.
; Test if we can read alloca instructions.
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %if --need=allow_disable_ir_gen --command \
; RUN: %p2i -i %s --args -notranslate -timing | \
; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \
; RUN: | %if --need=allow_disable_ir_gen --command \
; RUN: FileCheck --check-prefix=NOIR %s
; RUN: FileCheck --check-prefix=NOIR %s
; Show examples where size is defined by a constant.
; Show examples where size is defined by a constant.
...
...
tests_lit/reader_tests/binops.ll
View file @
0d4fc92b
...
@@ -3,9 +3,7 @@
...
@@ -3,9 +3,7 @@
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %l2i -i %s --insts | %ifl FileCheck %s
; RUN: %l2i -i %s --insts | %ifl FileCheck %s
; RUN: %lc2i -i %s --insts | %iflc FileCheck %s
; RUN: %lc2i -i %s --insts | %iflc FileCheck %s
; RUN: %if --need=allow_disable_ir_gen --command \
; RUN: %p2i -i %s --args -notranslate -timing | \
; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \
; RUN: | %if --need=allow_disable_ir_gen --command \
; RUN: FileCheck --check-prefix=NOIR %s
; RUN: FileCheck --check-prefix=NOIR %s
; TODO(kschimpf): add i8/i16. Needs bitcasts.
; TODO(kschimpf): add i8/i16. Needs bitcasts.
...
...
tests_lit/reader_tests/branch.ll
View file @
0d4fc92b
; Tests if we handle a branch instructions.
; Tests if we handle a branch instructions.
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %if --need=allow_disable_ir_gen --command \
; RUN: %p2i -i %s --args -notranslate -timing | \
; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \
; RUN: | %if --need=allow_disable_ir_gen --command \
; RUN: FileCheck --check-prefix=NOIR %s
; RUN: FileCheck --check-prefix=NOIR %s
define
internal
void
@SimpleBranch
()
{
define
internal
void
@SimpleBranch
()
{
...
...
tests_lit/reader_tests/call.ll
View file @
0d4fc92b
...
@@ -2,10 +2,8 @@
...
@@ -2,10 +2,8 @@
; RUN: %p2i -i %s --insts --args -allow-externally-defined-symbols \
; RUN: %p2i -i %s --insts --args -allow-externally-defined-symbols \
; RUN: | FileCheck %s
; RUN: | FileCheck %s
; RUN: %if --need=allow_disable_ir_gen --command \
; RUN: %p2i -i %s --args -notranslate -timing \
; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \
; RUN: -allow-externally-defined-symbols | \
; RUN: -allow-externally-defined-symbols \
; RUN: | %if --need=allow_disable_ir_gen --command \
; RUN: FileCheck --check-prefix=NOIR %s
; RUN: FileCheck --check-prefix=NOIR %s
define
internal
i32
@fib
(
i32
%n
)
{
define
internal
i32
@fib
(
i32
%n
)
{
...
...
tests_lit/reader_tests/casts.ll
View file @
0d4fc92b
; Tests if we can read cast operations.
; Tests if we can read cast operations.
; RUN: %p2i -i %s --insts --no-local-syms | FileCheck %s
; RUN: %p2i -i %s --insts --no-local-syms | FileCheck %s
; RUN: %if --need=allow_disable_ir_gen --command \
; RUN: %p2i -i %s --args -notranslate -timing | \
; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \
; RUN: | %if --need=allow_disable_ir_gen --command \
; RUN: FileCheck --check-prefix=NOIR %s
; RUN: FileCheck --check-prefix=NOIR %s
; TODO(kschimpf) Find way to test pointer conversions (since they in general
; TODO(kschimpf) Find way to test pointer conversions (since they in general
...
...
tests_lit/reader_tests/compare.ll
View file @
0d4fc92b
; Test if we can read compare instructions.
; Test if we can read compare instructions.
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %if --need=allow_disable_ir_gen --command \
; RUN: %p2i -i %s --args -notranslate -timing | \
; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \
; RUN: | %if --need=allow_disable_ir_gen --command \
; RUN: FileCheck --check-prefix=NOIR %s
; RUN: FileCheck --check-prefix=NOIR %s
define
internal
i1
@IcmpI1
(
i32
%p1
,
i32
%p2
)
{
define
internal
i1
@IcmpI1
(
i32
%p1
,
i32
%p2
)
{
...
...
tests_lit/reader_tests/constants.ll
View file @
0d4fc92b
; Test handling of constants in function blocks.
; Test handling of constants in function blocks.
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %if --need=allow_disable_ir_gen --command \
; RUN: %p2i -i %s --args -notranslate -timing | \
; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \
; RUN: | %if --need=allow_disable_ir_gen --command \
; RUN: FileCheck --check-prefix=NOIR %s
; RUN: FileCheck --check-prefix=NOIR %s
define
internal
void
@TestIntegers
()
{
define
internal
void
@TestIntegers
()
{
...
...
tests_lit/reader_tests/forwardref.ll
View file @
0d4fc92b
...
@@ -3,9 +3,7 @@
...
@@ -3,9 +3,7 @@
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: llvm-as < %s | pnacl-freeze | pnacl-bcdis -no-records \
; RUN: llvm-as < %s | pnacl-freeze | pnacl-bcdis -no-records \
; RUN: | FileCheck --check-prefix=DUMP %s
; RUN: | FileCheck --check-prefix=DUMP %s
; RUN: %if --need=allow_disable_ir_gen --command \
; RUN: %p2i -i %s --args -notranslate -timing | \
; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \
; RUN: | %if --need=allow_disable_ir_gen --command \
; RUN: FileCheck --check-prefix=NOIR %s
; RUN: FileCheck --check-prefix=NOIR %s
define
internal
void
@LoopCarriedDep
()
{
define
internal
void
@LoopCarriedDep
()
{
...
...
tests_lit/reader_tests/globalinit.pnacl.ll
View file @
0d4fc92b
...
@@ -6,10 +6,8 @@
...
@@ -6,10 +6,8 @@
; RUN: | %ifl FileCheck %s
; RUN: | %ifl FileCheck %s
; RUN: %lc2i -i %s --insts --args -allow-externally-defined-symbols \
; RUN: %lc2i -i %s --insts --args -allow-externally-defined-symbols \
; RUN: | %iflc FileCheck %s
; RUN: | %iflc FileCheck %s
; RUN: %if --need=allow_disable_ir_gen --command \
; RUN: %p2i -i %s --args -notranslate -timing \
; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \
; RUN: -allow-externally-defined-symbols | \
; RUN: -allow-externally-defined-symbols \
; RUN: | %if --need=allow_disable_ir_gen --command \
; RUN: FileCheck --check-prefix=NOIR %s
; RUN: FileCheck --check-prefix=NOIR %s
@PrimitiveInit
=
internal
global
[
4
x
i8
]
c"\1B\00\00\00"
,
align
4
@PrimitiveInit
=
internal
global
[
4
x
i8
]
c"\1B\00\00\00"
,
align
4
...
...
tests_lit/reader_tests/globalrelocs.ll
View file @
0d4fc92b
...
@@ -3,9 +3,7 @@
...
@@ -3,9 +3,7 @@
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %l2i -i %s --insts | %ifl FileCheck %s
; RUN: %l2i -i %s --insts | %ifl FileCheck %s
; RUN: %lc2i -i %s --insts | %iflc FileCheck %s
; RUN: %lc2i -i %s --insts | %iflc FileCheck %s
; RUN: %if --need=allow_disable_ir_gen --command \
; RUN: %p2i -i %s --args -notranslate -timing | \
; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \
; RUN: | %if --need=allow_disable_ir_gen --command \
; RUN: FileCheck --check-prefix=NOIR %s
; RUN: FileCheck --check-prefix=NOIR %s
@bytes
=
internal
global
[
7
x
i8
]
c"abcdefg"
@bytes
=
internal
global
[
7
x
i8
]
c"abcdefg"
...
...
tests_lit/reader_tests/insertextract.ll
View file @
0d4fc92b
...
@@ -3,9 +3,7 @@
...
@@ -3,9 +3,7 @@
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %l2i -i %s --insts | %ifl FileCheck %s
; RUN: %l2i -i %s --insts | %ifl FileCheck %s
; RUN: %lc2i -i %s --insts | %iflc FileCheck %s
; RUN: %lc2i -i %s --insts | %iflc FileCheck %s
; RUN: %if --need=allow_disable_ir_gen --command \
; RUN: %p2i -i %s --args -notranslate -timing | \
; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \
; RUN: | %if --need=allow_disable_ir_gen --command \
; RUN: FileCheck --check-prefix=NOIR %s
; RUN: FileCheck --check-prefix=NOIR %s
define
internal
void
@ExtractV4xi1
(<
4
x
i1
>
%v
)
{
define
internal
void
@ExtractV4xi1
(<
4
x
i1
>
%v
)
{
...
...
tests_lit/reader_tests/load.ll
View file @
0d4fc92b
; Test if we can read load instructions.
; Test if we can read load instructions.
; RUN: %p2i --no-local-syms -i %s --insts | FileCheck %s
; RUN: %p2i --no-local-syms -i %s --insts | FileCheck %s
; RUN: %if --need=allow_disable_ir_gen --command \
; RUN: %p2i -i %s --args -notranslate -timing | \
; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \
; RUN: | %if --need=allow_disable_ir_gen --command \
; RUN: FileCheck --check-prefix=NOIR %s
; RUN: FileCheck --check-prefix=NOIR %s
define
internal
i32
@load_i8
(
i32
%addr
)
{
define
internal
i32
@load_i8
(
i32
%addr
)
{
...
...
tests_lit/reader_tests/nacl-atomic-intrinsics.ll
View file @
0d4fc92b
; Test parsing NaCl atomic instructions.
; Test parsing NaCl atomic instructions.
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %if --need=allow_disable_ir_gen --command \
; RUN: %p2i -i %s --args -notranslate -timing | \
; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \
; RUN: | %if --need=allow_disable_ir_gen --command \
; RUN: FileCheck --check-prefix=NOIR %s
; RUN: FileCheck --check-prefix=NOIR %s
declare
i8
@llvm.nacl.atomic.load.i8
(
i8
*,
i32
)
declare
i8
@llvm.nacl.atomic.load.i8
(
i8
*,
i32
)
...
...
tests_lit/reader_tests/nacl-other-intrinsics.ll
View file @
0d4fc92b
...
@@ -2,10 +2,8 @@
...
@@ -2,10 +2,8 @@
; RUN: %p2i -i %s --insts --args -allow-externally-defined-symbols \
; RUN: %p2i -i %s --insts --args -allow-externally-defined-symbols \
; RUN: | FileCheck %s
; RUN: | FileCheck %s
; RUN: %if --need=allow_disable_ir_gen --command \
; RUN: %p2i -i %s --args -notranslate -timing \
; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \
; RUN: -allow-externally-defined-symbols | \
; RUN: -allow-externally-defined-symbols \
; RUN: | %if --need=allow_disable_ir_gen --command \
; RUN: FileCheck --check-prefix=NOIR %s
; RUN: FileCheck --check-prefix=NOIR %s
declare
i8
*
@llvm.nacl.read.tp
()
declare
i8
*
@llvm.nacl.read.tp
()
...
...
tests_lit/reader_tests/phi.ll
View file @
0d4fc92b
; Test reading phi instructions.
; Test reading phi instructions.
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %if --need=allow_disable_ir_gen --command \
; RUN: %p2i -i %s --args -notranslate -timing | \
; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \
; RUN: | %if --need=allow_disable_ir_gen --command \
; RUN: FileCheck --check-prefix=NOIR %s
; RUN: FileCheck --check-prefix=NOIR %s
; TODO(kschimpf) Add forward reference examples.
; TODO(kschimpf) Add forward reference examples.
...
...
tests_lit/reader_tests/select.ll
View file @
0d4fc92b
; Tests if we can read select instructions.
; Tests if we can read select instructions.
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %if --need=allow_disable_ir_gen --command \
; RUN: %p2i -i %s --args -notranslate -timing | \
; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \
; RUN: | %if --need=allow_disable_ir_gen --command \
; RUN: FileCheck --check-prefix=NOIR %s
; RUN: FileCheck --check-prefix=NOIR %s
define
internal
void
@Seli1
(
i32
%p
)
{
define
internal
void
@Seli1
(
i32
%p
)
{
...
...
tests_lit/reader_tests/store.ll
View file @
0d4fc92b
; Test if we can read store instructions.
; Test if we can read store instructions.
; RUN: %p2i -i %s --insts --no-local-syms | FileCheck %s
; RUN: %p2i -i %s --insts --no-local-syms | FileCheck %s
; RUN: %if --need=allow_disable_ir_gen --command \
; RUN: %p2i -i %s --args -notranslate -timing | \
; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \
; RUN: | %if --need=allow_disable_ir_gen --command \
; RUN: FileCheck --check-prefix=NOIR %s
; RUN: FileCheck --check-prefix=NOIR %s
define
internal
void
@store_i8
(
i32
%addr
)
{
define
internal
void
@store_i8
(
i32
%addr
)
{
...
...
tests_lit/reader_tests/switch.ll
View file @
0d4fc92b
; Test switch instructions.
; Test switch instructions.
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %if --need=allow_disable_ir_gen --command \
; RUN: %p2i -i %s --args -notranslate -timing | \
; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \
; RUN: | %if --need=allow_disable_ir_gen --command \
; RUN: FileCheck --check-prefix=NOIR %s
; RUN: FileCheck --check-prefix=NOIR %s
define
internal
void
@testDefaultSwitch
(
i32
%a
)
{
define
internal
void
@testDefaultSwitch
(
i32
%a
)
{
...
...
tests_lit/reader_tests/unnamed.ll
View file @
0d4fc92b
...
@@ -12,9 +12,7 @@
...
@@ -12,9 +12,7 @@
; RUN: -default-function-prefix=h -default-global-prefix=g \
; RUN: -default-function-prefix=h -default-global-prefix=g \
; RUN: | FileCheck --check-prefix=BAD %s
; RUN: | FileCheck --check-prefix=BAD %s
; RUN: %if --need=allow_disable_ir_gen --command \
; RUN: %p2i -i %s --args -notranslate -timing | \
; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \
; RUN: | %if --need=allow_disable_ir_gen --command \
; RUN: FileCheck --check-prefix=NOIR %s
; RUN: FileCheck --check-prefix=NOIR %s
; TODO(kschimpf) Check global variable declarations, once generated.
; TODO(kschimpf) Check global variable declarations, once generated.
...
...
tests_lit/reader_tests/unreachable.ll
View file @
0d4fc92b
; Test parsing unreachable instruction.
; Test parsing unreachable instruction.
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %if --need=allow_disable_ir_gen --command \
; RUN: %p2i -i %s --args -notranslate -timing | \
; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \
; RUN: | %if --need=allow_disable_ir_gen --command \
; RUN: FileCheck --check-prefix=NOIR %s
; RUN: FileCheck --check-prefix=NOIR %s
define
internal
i32
@divide
(
i32
%num
,
i32
%den
)
{
define
internal
i32
@divide
(
i32
%num
,
i32
%den
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment