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
dddaf9ca
Commit
dddaf9ca
authored
Dec 04, 2014
by
Jim Stichnoth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Subzero: Fix the g++ build (e.g. Windows).
BUG=
https://code.google.com/p/nativeclient/issues/detail?id=4006
R=kschimpf@google.com Review URL:
https://codereview.chromium.org/773583004
parent
2a7fcbb4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
8 deletions
+29
-8
IceELFSection.cpp
src/IceELFSection.cpp
+1
-0
IceGlobalContext.cpp
src/IceGlobalContext.cpp
+6
-4
IceInst.h
src/IceInst.h
+16
-4
IceOperand.cpp
src/IceOperand.cpp
+2
-0
PNaClTranslator.cpp
src/PNaClTranslator.cpp
+4
-0
No files found.
src/IceELFSection.cpp
View file @
dddaf9ca
...
...
@@ -55,6 +55,7 @@ void ELFSymbolTableSection::createDefinedSym(const IceString &Name,
else
Unique
=
GlobalSymbols
.
insert
(
std
::
make_pair
(
Key
,
NewSymbol
)).
second
;
assert
(
Unique
);
(
void
)
Unique
;
}
void
ELFSymbolTableSection
::
noteUndefinedSym
(
const
IceString
&
Name
,
...
...
src/IceGlobalContext.cpp
View file @
dddaf9ca
...
...
@@ -26,12 +26,14 @@
#include "IceTimerTree.h"
#include "IceTypes.h"
template
<>
struct
std
::
hash
<
Ice
::
RelocatableTuple
>
{
std
::
size_t
operator
()(
const
Ice
::
RelocatableTuple
&
Key
)
const
{
return
std
::
hash
<
Ice
::
IceString
>
()(
Key
.
Name
)
+
std
::
hash
<
Ice
::
RelocOffsetT
>
()(
Key
.
Offset
);
namespace
std
{
template
<>
struct
hash
<
Ice
::
RelocatableTuple
>
{
size_t
operator
()(
const
Ice
::
RelocatableTuple
&
Key
)
const
{
return
hash
<
Ice
::
IceString
>
()(
Key
.
Name
)
+
hash
<
Ice
::
RelocOffsetT
>
()(
Key
.
Offset
);
}
};
}
// end of namespace std
namespace
Ice
{
...
...
src/IceInst.h
View file @
dddaf9ca
...
...
@@ -128,8 +128,17 @@ public:
// result in any native instructions, and a target-specific
// instruction results in a single native instruction.
virtual
uint32_t
getEmitInstCount
()
const
{
return
0
;
}
virtual
void
emit
(
const
Cfg
*
Func
)
const
=
0
;
virtual
void
emitIAS
(
const
Cfg
*
Func
)
const
=
0
;
// TODO(stichnot): Change Inst back to abstract once the g++ build
// issue is fixed. llvm::ilist<Ice::Inst> doesn't work under g++
// because the resize(size_t, Ice::Inst) method is incorrectly
// declared and thus doesn't allow the abstract class Ice::Inst.
// The method should be declared resize(size_t, const Ice::Inst &).
// virtual void emit(const Cfg *Func) const = 0;
// virtual void emitIAS(const Cfg *Func) const = 0;
virtual
void
emit
(
const
Cfg
*
)
const
{
llvm_unreachable
(
"emit on abstract class"
);
}
virtual
void
emitIAS
(
const
Cfg
*
Func
)
const
{
emit
(
Func
);
}
virtual
void
dump
(
const
Cfg
*
Func
)
const
;
virtual
void
dumpExtras
(
const
Cfg
*
Func
)
const
;
void
dumpDecorated
(
const
Cfg
*
Func
)
const
;
...
...
@@ -835,11 +844,12 @@ protected:
}
// end of namespace Ice
namespace
llvm
{
// Override the default ilist traits so that Inst's private ctor and
// deleted dtor aren't invoked.
template
<>
struct
llvm
::
ilist_traits
<
Ice
::
Inst
>
:
public
llvm
::
ilist_default_traits
<
Ice
::
Inst
>
{
struct
ilist_traits
<
Ice
::
Inst
>
:
public
ilist_default_traits
<
Ice
::
Inst
>
{
Ice
::
Inst
*
createSentinel
()
const
{
return
static_cast
<
Ice
::
Inst
*>
(
&
Sentinel
);
}
...
...
@@ -853,4 +863,6 @@ private:
mutable
ilist_half_node
<
Ice
::
Inst
>
Sentinel
;
};
}
// end of namespace llvm
#endif // SUBZERO_SRC_ICEINST_H
src/IceOperand.cpp
View file @
dddaf9ca
...
...
@@ -253,6 +253,7 @@ const Inst *VariableTracking::getFirstDefinition() const {
assert
(
FirstOrSingleDefinition
);
return
FirstOrSingleDefinition
;
}
return
NULL
;
}
const
Inst
*
VariableTracking
::
getSingleDefinition
()
const
{
...
...
@@ -265,6 +266,7 @@ const Inst *VariableTracking::getSingleDefinition() const {
assert
(
FirstOrSingleDefinition
);
return
FirstOrSingleDefinition
;
}
return
NULL
;
}
void
VariablesMetadata
::
init
(
MetadataKind
TrackingKind
)
{
...
...
src/PNaClTranslator.cpp
View file @
dddaf9ca
...
...
@@ -1681,6 +1681,8 @@ private:
Cond
=
Ice
::
InstIcmp
::
Sle
;
return
true
;
default
:
// Make sure Cond is always initialized.
Cond
=
static_cast
<
Ice
::
InstIcmp
::
ICond
>
(
0
);
return
false
;
}
}
...
...
@@ -1739,6 +1741,8 @@ private:
Cond
=
Ice
::
InstFcmp
::
True
;
return
true
;
default
:
// Make sure Cond is always initialized.
Cond
=
static_cast
<
Ice
::
InstFcmp
::
FCond
>
(
0
);
return
false
;
}
}
...
...
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