--- /dev/null
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd. All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __COCO_IR_LOAD_H__
+#define __COCO_IR_LOAD_H__
+
+#include "coco/IR/Op.h"
+#include "coco/IR/Object.h"
+#include "coco/IR/Use.h"
+
+namespace coco
+{
+
+/**
+ * @brief Load an Object
+ */
+class Load final : public Op, public Object::Consumer
+{
+public:
+ explicit Load();
+
+public:
+ Load(const Load &) = delete;
+ Load(Load &&) = delete;
+
+public:
+ std::set<Object *> uses(void) const override;
+
+public:
+ Load *asLoad(void) override { return this; }
+ const Load *asLoad(void) const override { return this; }
+
+public:
+ Instr *loc(void) override { return parent(); }
+
+public:
+ void object(Object *o) { _obj.value(o); }
+ Object *object(void) const { return _obj.value(); }
+
+private:
+ Use _obj;
+};
+
+} // namespace coco
+
+#endif // __COCO_IR_LOAD_H__
--- /dev/null
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd. All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "coco/IR/Load.h"
+
+#include <cassert>
+
+namespace coco
+{
+
+Load::Load() : _obj{this}
+{
+ // DO NOTHING
+}
+
+std::set<Object *> Load::uses(void) const
+{
+ std::set<Object *> res;
+
+ if (auto obj = object())
+ {
+ res.insert(obj);
+ }
+
+ return res;
+}
+
+} // namespace coco